Solved

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

Posted on 2008-06-25
2
303 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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)…
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

617 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