Last post May 25, 2012 07:18 AM by nijhawan.saurabh
May 25, 2012 06:58 AM|.net_junkie|LINK
What is main difference between a tier and a layer,all these days i thought these both are the same.How they differ in a project?
May 25, 2012 07:06 AM|nijhawan.saurabh|LINK
A tier is a physical separation i.e. different hardware for different purpose.For ex: your Database server is on another machine while Business Logic is not another server.
A layer is a logical separation i.e. same hardware for different purpose.For ex: your UI is on a machine while Business Logic is in another set of classes.
This would further explain things:
A n-tier architecture is a physical structuring mechanism, while a n-layer architecture is a logical structuring mechanism.
While is true, for example, that a 3-tier application is (at least) a 3-layer application, a 3-layer application could have only 1 or 2 tier(s).
May 25, 2012 07:11 AM|.net_junkie|LINK
Can you explain me in a simple way??i am confused by this.Explain me in simple terms or small practical example.Thanks.
May 25, 2012 07:18 AM|nijhawan.saurabh|LINK
Well Tier means separation on the basis of Hardware, simple example being your html mapges and aspx pages are on one server but Database is on some other machine and you access your database from network.
Layer means you have logically separated your User Interface and Data Access layer, example all data access code is written inside a class which is responsible to get a connection to the database and fetch data for you.You use layering in order to make maintenance
of the project easier, as later on if the Databse changes, you have to make cahnges only in one data access layer class.