Solved

What is the theory behind using a multi-tier setup for a .Net website?

Posted on 2008-06-25
2
297 Views
Last Modified: 2013-11-06
In other words, why should you use a business logic layer, data access layer, etc.  I'm fairly new to ASP.NET programming. I've worked on a .net client/server app in the past however.  What is the theory behind using a multi tier design?  Also, if there are any resources/links you may have for learnin this, I would appreciate it!

Thanks
Kevin
0
Comment
Question by:kevinjd
2 Comments
 
LVL 19

Accepted Solution

by:
elimesika earned 250 total points
ID: 21869254
HI

basically this was a result of the need to create scalable applications in distributed environments.

The main Design Pattern behind that is the Model-View-Controller , known also as MVP.
According to that , the model is responsible for the data access layer , the view is responsible for the presentation layer and the controller is responsible for the business logic.

there are lot of advantages using it as :

Scalability
Maintainability
Low  sensibility to changes (since interfaces are the glue between layers, so if there is a change, lets say that you have to support another db vendor, the viewer and controller are not changed ..)

Read more at

http://www.enode.com/x/markup/tutorial/mvc.html
http://www.developerfusion.co.uk/show/3058/2/
0
 
LVL 18

Assisted Solution

by:Richard Lee
Richard Lee earned 250 total points
ID: 21869301
One advantage of separating you layers is for loose coupling. Make one component less reliant on another which would be the case if they were blended together. For example if your data access layer is separate and your using MS Access then you can seemless upgrade to SQL Server / Oracle by simply changing the implemetation of your method and leaving interface / method signatures the same.

Imagine you data access layer was in a separate assembly and you have ported your data to another database then you can simply rebuild that single assembly and deploy and you have migrated successfully. There are other concerns suchs as connection string etc... but the web.config in a sense supports this loose coupling idea. Change the connecstring and you are done.

There are several concerns you should always keep in mind when designing applications. Maintainability, usability, reusability, reliability, extendability. Multi-tier applications provide a measure of these.

The business layer also is designed to clearly and loosely implement busines logic, for instance security measures while not interfering with the UI for instance. The UI is left free to evolve however it chooses without worry that some business logic will break. Plus you can see how reusability of the business functions can apply right across the application as its is self contained and any application or part and an application can consume it.

I also enforce who can use the data access layer within my application and thats normally only the business layer simply by separating them in different assemblies, making the DAL method internal and only allowing the business layer assembly access. You may want to check out the InternalsVisibleTo assembly attribute (beautiful!)

These are just some of the benefits of using multi-tiered design

http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/iisbook/c06_multi-tier_design.mspx?mfr=true

http://www.csharpcourses.com/2008/05/multi-tier-programming-part1.html

Check out the two above links and you should be good to go.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

What is Waterfall Model? Waterfall model is the classic Software Development Life Cycle method practiced in software development process. As the name "waterfall" describes, this development is flowing downwards steadily like waterfall, i.e., procee…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now