Layered Architecture Flashcards
(8 cards)
Explain the layered Architecture?
Top layers depend on and use the services of lower layers.
Lower layers work independently and are unaware of who uses them.
Layers are isolated, hiding internal details from layers above.
What are the benefits of a layered architecture?
Each part (layer) only talks to the one below it, which makes things easier to understand.
If you change something in the bottom part, the top part still works fine.
You can swap out a part without breaking the whole system.
Each part works on its own, so they don’t get in each other’s way.
Lower parts can be used again in different places without writing the same code twice.
Disadvantages of a layered architecture
Cascade changes (if a change occurs in one layer, it might require changes in all layers below)
Extra layers may reduce performance
Difficulties of a layered architecture
Deciding how many layers and each functionality per layer
Talk about the 3 layer architecture
Presentation Layer:
Shows information to the user and handles their input. Sends requests to the logic layer and shows the results.
Domain Logic Layer:
Does the main work of the app — the core features and rules.
Data Sources Layer:
Handles saving, loading, and getting data from databases or other services.
What happens when the user is not a person?
The traditional presentation layer concept changes (it becomes an API instead of a UI)
If my application provides a service then its a…
If it consumes a service from others then its a…
1- Interface
2- Source
Where are layers executed, and what’s the different in the result?
Everything is on the server -> Easier upgrades and maintenance
Part on the client -> better responsiveness and offline capabilities