Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 

YOU ARE HERE: HOME Questions What is the difference between tier and layer in terms of architecture



3 Layer vs 3 Tier

View(s): 12707

What is the difference between tier and layer in terms of architecture?

Answer 1)
Logical layers are merely a way of organizing your code. 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.

Physical 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.

How to implement 3 layer applications: 

If you take an example of web application, we implement Business layer and Data access layer as class library projects. And passing objects between layers is easy. As all assemblies will run under same app domain in single machine. But here is one good design decision about passing objects between layers. It’s better to pass Typed DataSets or Business Objects (also called as Info objects or Plain old c# objects (POCO)) between layers instead of passing DataSets. Because General DataSets will not enforce to specify right column name and thereby chances are more for runtime errors. But if you go for Typed DataSets or Business Objects, we can identify such errors at compile time itself.

What are the advantages you get with 3 layer?
  1. This decoupling will improve readability and reusability
  2. Minimizes the application changes due to impact of the changes in other layers.
    Ex: if there is a change in database schema like adding a new column, deleting an existing column. We make changes to only data access layer and business layer and presentation layer stay non-impacted.

How to implement 3 tier applications: 

Implementing 3 tier applications are not straight as 3 layers, because each layer will be deployed in different machines. So here, we need a mechanism to send the objects between different machines over the network. 

In .NET, we can achieve above scenario using technologies called Web Services, Remoting or WCF. So in order to implement 3 tier applications in .NET we have to go for either Web Services, Remoting or WCF.

Earlier to .NET, 3 tier applications were built using DCOM or Socket programing (TCP/IP programing)

What are the advantages you get with 3 tier?
  1. All advantages in 3 layer + scalability
    As application will be deployed in multiple systems, load will be shared among the tiers and scalability will increase.
  Asked in:  LiquidHub   Expertise Level:  Experienced
  Last updated on Monday, 14 November 2011
4/5 stars (9 vote(s))

Register Login Ask Us Write to Us Help