Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-06-25
2
Medium Priority
?
310 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 1000 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 1000 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the most frequent problems a "newbie" developer may encounter is having to deal with different data formats. One for all: THE DATE We, as humans, need to "see" a date and then interpret it (much of the times this is an automatic operation)…
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…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
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…

824 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