Skip to content
BENIBIX Learn

Layered Architecture

Development🏗️ ArchitectureArchitecture Styles

Also known as N-Tier Architecture, Three-Tier Architecture, Layers

An app split into stacked layers. Each one calls only the one below.

Think of it like

Think of it like a cake with layers. Each layer sits only on the one below it.

Example

In Jack's app, a button calls the order rules layer. That layer calls the data layer, which talks to the database. The button never touches the database.

Why it matters

Clear layers tell everyone where new code goes, which keeps a growing app in order.

Definition

Layered architecture splits an app into stacked layers, each with one kind of job. A common set is three: the screens, the business rules and the data access. Each layer only calls the layer just below it. So the screens never talk to the database directly. It is easy to understand, which is why so many apps start this way.

Common mistake

Letting the rules of the business lean on how the database works. Then a new database means new rules too.

Key takeaways

  1. 1
    Stacked layers. One kind of job each.
  2. 2
    Call one down. Never skip a layer.
  3. 3
    Easy to grasp. A common first shape.