3 tier
Thread: three tier
Joined: 17 Sep 2002
Posted: 15 Oct 2002 08:28 AM
----------------------------
Ok I understand what goes on each of the three tiers but I dont understand is how they talk to each other can anyone give me a website that explains the three tiers and how to set them up. Most of them just show what goes on each tier. I already understand that.
TopLabs (Answers)
| Thumbnail | TopLab | Author | Date | Reward |
|---|---|---|---|---|
|
also da hätte wirklich der Link genügt - | FAL\Frederic | 2002-10-19 | $3.74 |
|
three tier
Re: three tier Posted: 17 Oct 2002 03:37 AM Create a new solution Add a Web Project to the solution. This is your Presentation Layer Add a Class Library project to the solution... Call it Business Add another Class Library to the solution... Call it DataAccess In the Web Project add a reference to Business In the Business Project add a reference to DataAccess Where to put your code DataAccess In the DataAccess project create a class called Util. This class should hold functions to call the database. e.g. RunSpRetDataTable(), RunSpRetInt32() etc.... (youll need to write these) Now create a class in the DataAccess project for Customer, Order etc... (what ever you need for your project). Typically the customer class would have a function Detail(pint32CustomerID as int32, ..... ). Here is a Detail function from one of my projects: Business In the Business class.. Create a Function called Detail (with the same parameters as DataAccess). This function will pass through to the DataAccess Layer. If there are any business rules or audit tracking you need to apply this is where it goes. Web (Presentation layer) The code behind of a webform will call the Detail function in the Business layer which returns a DataTable... you can do what you want with the results.. |
Oli | 2002-10-19 | $3.92 |