3

In a course, a test's solution says the following has a 4-tier architecture

enter image description here

But it seems to have a 3-tier architecture to me. I don't count the client (web browser) as a tier itself, but the test's solution seems to count it.

Which one is correct, according to the wikipedia article or consensus?

4
  • 1
    Why don't you count the client as a tier?
    – Eric King
    Jun 7, 2019 at 4:05
  • 1
    The reason I ask is that the client, in modern web apps, can have a lot of code. Sometimes more than the back-end tiers. So it seems reasonable to me to consider it a 'tier' in and of itself.
    – Eric King
    Jun 7, 2019 at 4:09
  • 2
    What is the definition of "tier" used by the course? Are you sure you are using the same definition? Jun 7, 2019 at 4:51
  • 1
    If you don't think it is a credible tier, try removing it.
    – Robbie Dee
    Jun 7, 2019 at 8:00

2 Answers 2

2

The challenge in answering this question is that we are dealing with terms, in this case "tier", that have imprecise meanings and different people use the term differently.

For example, a common view is that there is a distinction between layers and tiers. A layer is an abstract separation, as in the controllers, business logic and data objects in your diagram. Tiers are physical separations. In your diagram's case, the browser, the database and the logic within the Java application are the tiers.

So taking that definition, the diagram shows a three tier, four layer architecture. The browser definitely is a tier, and, for example, "presentation" isn't a tier; it's a layer.

But this isn't a definition that is set in stone or universally recognised. As the Wikipedia article that you link to mentions, many people will use the two terms, layer and tier, interchangeably. At that point, your diagram could be three tier or four tier, depending on how the person chooses to apply the term.

1
  • Interesting arguments. My understanding so far was that a tiers is a layer that can be deployed separately, which would mean four.
    – Christophe
    Jun 7, 2019 at 13:25
2

Based on this definition of an n-tiers architecture, a tiers is a multilayered architecture where the layers are made of components. In fact, this definition proposed by one of our peers is very close to the more generally accepted definition used in scientific literature:

A Multi-tier Architecture is a software architecture in which different software components, organized in tiers (layers), provide dedicated functionality.

The key in this definition is the term “component”, which means a self-standing piece of software that can be deployed on different processing nodes.

This article about 3tiers architecture uses a similar definition, and identifies a component running on a user’s workstation as the first tiers (depending from where you start to count).

The fact that you have four layers, each being made of self-standing components would according to this definition make it a four tiers architecture.

Remark: this definition does not take into account the actual physical distribution of components. You could perfectly have a four tiers architecture, with one component running on multiple clients, and 3 other components installed on a single server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.