BolEnglishLearn · Play · Win
Login

🏛️ Software Design & Architecture · Architecture Evaluation Factors

🏛️

Architecture & Separation of Concerns

Quality AttributeCoreModule 1

Keeping different responsibilities in appropriate layers or components.

UI, business rules, integration, and data access should not become one tangled block.

💡 In practice

A button calls a service; the service applies business rules; a repository handles database access.

🖼️ CONCEPT PICTURE
A picture to help remember Architecture & Separation of Concerns
A button calls a service; the service applies business rules; a repository handles database access.

💡 Like a house with floors — plumbing, wiring and rooms each have their place, not all in one pile.

💡 Learn🛠️ Apply🎯 Check

💡 Why it matters

When UI, business rules, integration and data access are separated, each can change and be tested on its own. Tangle them and every change risks the whole system.

🛠️ How to achieve it

1
Layer responsibilities
UI → service (business rules) → repository (data). Each layer has one job.
2
Keep rules out of UI and database
Business logic lives in the service layer, not in buttons or SQL.
3
Depend inward, not outward
Core rules shouldn't depend on the UI or a specific technology.

⚠️ Signs of trouble

  • •Business rules are written inside UI event handlers or SQL.
  • •You can't change the database without touching the UI.
  • •One class mixes display, rules and data access.
⚠️ Common mistake: Putting business logic directly in the UI or stored procedures, so it can't be reused or tested and leaks everywhere.

🎯 Quick check

Score: 0/2

Three questions to test the idea.

  1. 1. Separation of concerns means…

    Answer: Different responsibilities live in appropriate separate layers

    UI, business rules and data access each belong in their own place.

  2. 2. A button click should…

    Answer: Call a service that applies the business rules

    The UI should delegate to a service; rules don't belong in the button.

🔑 Key terms

Layering
Stacking responsibilities in order.
Separation of concerns
Each part does one job.
Service layer
Where business rules live.
Repository
The data-access boundary.

✅ Review checklist

📊 Your progress

0%
Mark this topic learned to track it.
Saved in this browser.
🚀 Got it?
Mark it learned and move to the next topic.
Next topic →