Update:
Tier usually refers to physical layer, while layer usually refers to the logical layer. This is an older concept, today basically, most servers run in the cloud, where this "physical separation" does not make much sense.
I will treat Tier and Layer as the same word meaning (layer / level)
Tier / Layer is layer that represents a logical sequence, dot. You can create an application of 1.. N layers, the way you think it’s right. That doesn’t necessarily mean it’s something physical or in separate environments. is only the abstract separation of its application in itself.
For example nowadays it is well known applications in 3 layers... (not to be confused with MVC).
Just to illustrate:
Tier 1: Presentation layer, where everything is related to view, can be screens of Java Swing, Forms of . Net, or web pages.
Layer 2: Logic Layer. All the specific rules of your application, is the central part of your app. Where in fact you are conceiving your ideas.
Layer 3: Access to the bank. Well here, you... access the bank =). And there may also be some logic related to the transaction, etc.
Nothing prevents you from creating an app with 1,2,3,4 or 5+ layers, for example the 3 cited acimas, another Rest integration, another validation specific and so on. Everything depends on the project requirement. In general 3 is enough or even too.
Why use layers ?
In practice it is to separate the concepts. Generally communication is made through interfaces, which makes it much easier if you need to add or replace one of them. Another situation is when working as a team. Where you have the front guys developing the graphical interface, others in the "core", etc. Where each team does not change the code of the other team, all working on the same project. And at the same time they know what to pass and what to receive from the top/bottom layer by using the interfaces' contracts. All this in the world of POO, other paradgmas I’m not sure how it should work.
Emphasizing that "layer" is the abstract separation of the logic of your project. But when it comes to large architectures, we can also have N layers, at the application level, where each layer can correspond to an application running on a server, which communicates with another one running on another server, a good example of this are commercial applications, where things start to get really big.
In general more layers does not mean better, the more layers, the more decoupling you have, which is good but often unnecessary, but generates greater complexity and maintenance work.
Note which layer has the stack scheme, where to reach the last you must go through all intermediaries, ex:
layer 1 <-> layer 2 <-> layer 3
I’ve only seen to date the use of Tier to categorize datacenter level
– gpupo
Tier is a layer that represents a logical sequence, period. You can create an application of 1.. N layers, the way you think it’s right. That doesn’t mean it’s something physical or in separate environments. is only the abstract separation of its application.
– Josh
@Josuéeduardo What you said, with a little more detail, would give a good answer to post down there ;)
– bfavaretto
Not exactly a duplicate, but there’s a nice response from a guy I’ve never heard of on that topic.
– Bruno Augusto
It is an approach, but not the only prism that can be considered the layer level of an application.
– Cold