What is the difference between “Layers” and “Tiers”?

Layers refer to logical separation of code. Logical layers help you organise your code better. Typical layers include Presentation, Business and Data – the same as the traditional 3-tier model. But when we’re talking about layers, we’re only talking about logical organization of code. In no way is it implied that these layers might run on different computers or in different processes on a single computer or even in a single process on a single computer. All we are doing is discussing a way of organizing a code into a set of layers defined by specific function.
N-layers of application may reside on the same physical computer(same tier) and the components in each layer communicates with the components of other layer by well defined interfaces. Layered architecture focuses on the grouping of related functionality within an application into distinct layers that are stacked vertically on top of each other. Communication between layers is explicit and loosely coupled. With strict layering, components in one layer can interact only with components in the same layer or with components from the layer directly below it.
The main benefits of the layered architectural style are:

  • Abstraction
  • Isolation
  • Manageability
  • Performance
  • Reusability
  • Testability

Tiers are the physical deployment of layers. Tiers however, are only about where the code runs. Specifically, tiers are places where layers are deployed and where layers run. In other words, tiers are the physical deployment of layers.
N-tier architecture usually has atleast three separate logical parts, each located on separate physical server. Each tier is responsible for a specific functionality. Each tier is completely independent from all other tiers, except for those immediately above and below it. Communication between tiers is typically asynchronous in order to support better scalability.
The main benefits of tier architecture styles are:

  • Maintainability: Because each tier is independent of the other tiers, updates or changes can be carried out without affecting the application as a whole.
  • Scalability: Because tiers are based on the deployment of layers, scaling out an application is reasonably straightforward.
  • Flexibility: Because each tier can be managed or scaled independently, flexibility is increased.
  • Availability: Applications can exploit the modular architecture of enabling systems using easily scalable components, which increases availability.
Tagged . Bookmark the permalink.

Leave a Reply