Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

688 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