I see in some projects tree tiers classes in single project (in app_code) and access them. But in some other projects there are different projects for all lears in one solution. Which is the better approch and why??? Thanks in advace.
The layers reside on the same machine where the tiers can reside on different machines.
Layer communicates with each other either by Value or by Reference. However the Tiers could be on different machines, so they communicate by Value only – as serialized objects.
Layer is logical separation of code and Tier is physical separation of code, In other words we can say Tiers are the physical deployment of layers. Or a Tier becomes a Layer if it could be physically separated from the
Layers it consumes.
N-Tier Architecture is a physical structuring, while
a N-Layer Architecture is a logical structuring.
Now coming to 3 Layer Architecture and
3 Tier Architecture after getting an idea about Layer and Tier.
In 3 layer architecture, the Database Access Layer (DAL),
Business Logic Layer (BLL) and User Interface Layer (UIL) resides as 3 different project and the output of these 3 projects (.dll file) must be together in the
same server or on same machine in order for the system to run.However in 3 tier architecture, the
Database Access Layer (DAL), Business Logic Layer (BLL)and User Interface Layer (UIL) reside as 3 different projects. But each of the projects can be deployed at the
different server or at the different machines and distributed functionality is explored.
In 3 layer architecture DAL, BLL and UIL can work on same machine where as in a 3 Tier architecture a client in on one machine, the application Server is hosted in another machine and the database server resides in another machine i.e.
Three-tier is a
client–server architecture in which the
User Interface,
Business Logic , Data Storage and
Data Access are developed and maintained as independent
modules on separate
platforms.
In 3 Layer we have distinct namespaces and classes for the various layes i.e. we’re only talking about
logical organization of code and passing objects between layers is easy as all assemblies will run under same application in single machine.But 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 hence we use technologies called
Web Services, Remoting or WCF,
etc.in order to implement 3 tier applications
3 Layer Architecture will improve readability and
reusability, Minimizes the application changes due to impact of the changes in other layers. While 3 Tier Architecture has all advantages of 3 layer +
scalability as application will be deployed in different machines so load will be shared among the tiers and scalability will increase.
ThisPost = Helped == True ? "Mark As Answer" : "Elaborate your problem in more details"
P_IT
Marked as answer by Atiqiub on May 17, 2012 10:08 AM
Atiqiub
Member
54 Points
71 Posts
Three tiers in different projects
May 15, 2012 06:28 AM|LINK
Hi all,
I see in some projects tree tiers classes in single project (in app_code) and access them. But in some other projects there are different projects for all lears in one solution. Which is the better approch and why??? Thanks in advace.
Atiq
shree_ars
Participant
1395 Points
776 Posts
Re: Three tiers in different projects
May 15, 2012 12:48 PM|LINK
layered in different project is Best. SInce we can seperate the logics and its get independent.
More over the work get easier for modifications at layered level.
Basically 3-tier is for presentation changes, what ever controls get mapped.
So its should be in different project.for better development
Atiqiub
Member
54 Points
71 Posts
Re: Three tiers in different projects
May 16, 2012 05:56 AM|LINK
Thanks Shree! great reply but little short. Can anyone explain in detail or provide some links for detail.
Atiq
shree_ars
Participant
1395 Points
776 Posts
Re: Three tiers in different projects
May 16, 2012 06:49 AM|LINK
http://channukambalyal.tripod.com/NTierArchitecture.pdf
http://msdn.microsoft.com/en-us/library/ms973829.aspx
Have a look on above links. You get the idea of 3-tier arch...
P_IT
Participant
882 Points
222 Posts
Re: Three tiers in different projects
May 16, 2012 10:49 AM|LINK
Hi,
check here for 3 tier architecture
http://www.dotnetfunda.com/articles/article71.aspx
The layers reside on the same machine where the tiers can reside on different machines.
Layer communicates with each other either by Value or by Reference. However the Tiers could be on different machines, so they communicate by Value only – as serialized objects.
Layer is logical separation of code and Tier is physical separation of code, In other words we can say Tiers are the physical deployment of layers. Or a Tier becomes a Layer if it could be physically separated from the Layers it consumes.
N-Tier Architecture is a physical structuring, while a N-Layer Architecture is a logical structuring.
Now coming to 3 Layer Architecture and 3 Tier Architecture after getting an idea about Layer and Tier.
In 3 layer architecture, the Database Access Layer (DAL), Business Logic Layer (BLL) and User Interface Layer (UIL) resides as 3 different project and the output of these 3 projects (.dll file) must be together in the same server or on same machine in order for the system to run.However in 3 tier architecture, the Database Access Layer (DAL), Business Logic Layer (BLL) and User Interface Layer (UIL) reside as 3 different projects. But each of the projects can be deployed at the different server or at the different machines and distributed functionality is explored.
In 3 layer architecture DAL, BLL and UIL can work on same machine where as in a 3 Tier architecture a client in on one machine, the application Server is hosted in another machine and the database server resides in another machine i.e. Three-tier is a client–server architecture in which the User Interface, Business Logic , Data Storage and Data Access are developed and maintained as independent modules on separate platforms.
In 3 Layer we have distinct namespaces and classes for the various layes i.e. we’re only talking about logical organization of code and passing objects between layers is easy as all assemblies will run under same application in single machine.But 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 hence we use technologies called Web Services, Remoting or WCF, etc. in order to implement 3 tier applications
3 Layer Architecture will improve readability and reusability, Minimizes the application changes due to impact of the changes in other layers. While 3 Tier Architecture has all advantages of 3 layer + scalability as application will be deployed in different machines so load will be shared among the tiers and scalability will increase.
P_IT
Atiqiub
Member
54 Points
71 Posts
Re: Three tiers in different projects
May 17, 2012 10:08 AM|LINK
Thanks P_IT, very informative.
Atiq