Solved

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

Posted on 2008-06-25
2
301 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SignTool Error with Windows 10 5 218
dividesSelf challange 15 206
How to LOAD up a .NET Framework website with data? 2 59
Problem to open text file 11 136
The CRUD Functions CRUD, meaning "Create, Read, Update, Delete (http://en.wikipedia.org/wiki/Create,_read,_update_and_delete)" is a common term to data base developers.  It describes the essential functions of data base table maintenance.  This art…
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 perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

735 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