Solved

3 layer architecture for ASP.net Website

Posted on 2013-11-13
7
251 Views
Last Modified: 2013-11-19
I am creating a ASP.net website. I want to have it in 3-layer architecture.
I have attached the image of solution explorer of my website. Can anyone suggest how my website in solution explorer should look for 3 layer architecture.
0
Comment
Question by:Raj_donet
  • 4
  • 3
7 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39644955
Image?

In my experience, when you have a 3-layer architecture, you end up having one project per layer. This approach makes it easy to swap out a layer if you have to make changes in the future. For example:

Screenshot
You have a layer to interact with the database, a layer to enforce your business rules (like validation), and a layer to display information to the user. You should be able to swap out any layer without causing significant (ideally no) change in any other layer.
0
 

Author Comment

by:Raj_donet
ID: 39645257
Mine is ASP.Net website not web application. Please see the attachment.
Untitled.png
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39645304
That is inconsequential. My comment still holds.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Raj_donet
ID: 39645307
How can I create seperate projects in a website
It would be helful, if you can explain.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39645578
Right-click the solution within Solution Explorer, then select Add->New Project.

Screenshot
The solution is the top-most item within the Solution Explorer. You would be adding library projects:

Screenshot
...one for each layer (except the site itself, which is your UI layer).
0
 

Author Comment

by:Raj_donet
ID: 39647827
since they are going to be in different projects, should I include the dlls to access them?
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39647856
You should "Add Reference"s to them, yes. But typically your UI layer does not know about your Data layer; it only knows about the Business layer (meaning your UI layer would only have a reference to the Business layer project). Your Business layer only knows about the Data layer; it does not know about the UI layer (meaning your Business layer would only have a reference to the Data layer project). The Data layer knows about neither the UI layer nor the Business layer, so it has no references to either project. So graphically:

UI Layer -->  Business Layer  -->  Data Layer

..where each arrow represents a reference to another project. Maintaining this practice allows you to minimize the number of dependencies (and ideally the number of changes) between projects.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now