Reputation: 12852
What is the difference between 3 tier and 3 layer architecture ?
Upvotes: 3
Views: 5009
Reputation: 32310
- Presentation layer
- Business layer
- Data layer
Logical separation of code
if all the three layers are deployed in single system then it is in 3 Layer Architecture
i.e We can also say It's in single tier architecture since all the layers are deployed in single system.
Physical separation of code
if all the three layers are deployed in three different system then it is in 3 Tier Architecture
i.e But We can't say it's in 3 layer architecture because it's physically separated
Upvotes: 3
Reputation: 313
When you architect a website you need to consider how much compute power and memory you will need at each level of the sites operation. You will also need to consider security, scalability, and manageability of the site. For that reason it is a good idea to build your site as separate application parts that work together as a shared solution.
What is a Layer: A layer is simply application divisions (or different applications) running on the same server.
What is a Tier: A tier references the fact that an application that is part of the overall site or solution runs on a different server (or machine). In this you can not host multiple tiers on the same machine as by definition a tier is a separate machine. Visualization (hypervisors like VMware or Hyper-V can blur this line, but for the sake of clarity lets disregard them at this time)
Why do you need to consider this? Some aspects of your overall website or solution work well on the same machine while others do not. A good example is that as the site grows the Data Access Layer (DAL) and the Database (DB) use their processing and memory differently than the Presentation Layer (PL or GUI - General User Interface) and the Business Logic Layer (BL). Additionally, you will want more security on the DAL and the DB side to ensure the data is not being tampered with.
Overlap between LAYERS and Tiers: You can run more than one layer on one tier (machine). It is very common to start out a website running most of the functionality on one server and then break things up as your website grows and you add more functionality. It is also very common to run the Presentation Layer and the Business Logic Layer on the same tier. As you add rules to the BL layer, however, and as things get more complicated you want to have a site that will allow you to move an layer to another server when needed (or tier).
Hope this helps! If you like the answer mark as best please.
Upvotes: 3
Reputation: 7625
In architecture, tiers relate to 'platform' layers (sql server is a data tier, iis is a web tier), and layers relate to logical layers (presentation-, bussines-, data access-, data- layer).
There is an overlap between tiers and layers (for example, you can deploy the data layer to the data tier). You can choose to host multiple tiers on the same machines without impact on the architecture. Combining layers goes against a 3 layer architecture.
The relationship is that you deploy your layers on your tiers. In UML this is modeled in a deployment view.
Upvotes: 2