Layered Architecture Flashcards

1
Q

What is layering?

A

Layering is a common practice to separate and organise code units by their role/responsibilities in the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does a layered system is organized is broad strokes?

A

In a layered system, each layer:

  • Depends on the layers beneath it;
  • Is independent of the layers on top of it, having no knowledge of the layers using it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the advantages of the Layered Architecture?

A
  • We only need to understand the layers beneath the one we are working on;
  • Each layer is replaceable by an equivalent implementation, with no impact on the other layers;
  • Layers are optimal candidates for standardisation;
  • A layer can be used by several different higher-level layers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the disadvantages of the Layered Architecture?

A
  • Layers can not encapsulate everything (a field that is added to the UI, most likely also needs to be added to the DB);
  • Extra layers can harm performance, especially if in different tiers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the Lasagna Architecture?

A

Lasagna Architecture is the name commonly used to refer to the anti-pattern for Layered Architecture

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What’s the difference between tier and layer?

A

Tier is a physical unit, where the code / process runs. E.g.: client, application server, database server;

Layer is a logical unit, how to organize the code. E.g.: presentation (view), controller, models, repository, data access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly