Last post Apr 20, 2011 12:06 AM by atconway
Apr 19, 2011 09:34 PM|aj1085|LINK
From what i have heard and read N-tier and N-layer architecture is different.N-layer is when u have one single assembly for the whole application
and for including BAL and DAL layer you just add it in a separate folder under the application.Recently i figured out that BAL and DAL can be placed
in a separate class library as well that leads to two separate assemblies.Can it be termed as N-tier architecture since it is on a same machine unlike
BAL and DAL on a separate machine.
I would be grateful if any one can provide me insight into this.
Apr 20, 2011 12:06 AM|atconway|LINK
This is a good question and one that is often misinterpreted. It is important to understand the difference between tiers and layers. A tier is a physical separation of layers onto separate boundries or machines. Typically this is done
for scalability of hardware purposes, but has a downside of extra network latency due to the extra hops when making calls.
A logical layer is just a separation of logic into meaningful pieces or responsibilities. A traditional 3-layer logical UI-BLL-DAL architecture might have all (3) layers on the same machine with just the database on a separate server.
The UI, BLL, and DAL are all logically separated into their own layers and have their own responsibilities. Typically the 1st break off of a layer in this architecture would be to break the DAL off and place it on the database server to be as close
to the database as possible.
You could also have a 'SmartClient' application that may completely reside on the client (including the datasource in some scenarios) thus residing on a single tier, but the logical architecture is still an n-layer design with multiple logical layers.
Typically a n-layer logical design using the UI, BLL, DAL layers offer a nice separation of concerns and scalable design. So separating logical layers is always something I recommend. However, separating tiers or components into separate physical tiers
is something that should only be done when required or needed. Why? Well the more physical tiers, the more network hops that will be introduced, and ultimately there will be performance considerations.
So in your case it is a good idea to have a logical n-layer design using a UI, BLL, and DAL, and probably better to have the UI and BLL on (1) server and the Database reside on a separate server. It is common to have the DAL on the database
server as close to the database as possible, but not a requirement. It is not incorrect to separate all (3) layers physically, but if it is not required or not needed, then there is no need to separate the tiers physically to that degree.
The following links will help with this:
Should all apps be n-tier?
A variety of physical n-tier options: