Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 30th, 2007, 07:19 AM
Authorized User
 
Join Date: Aug 2007
Location: mumbai, maharashtra, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Flexible Architecture for Project in ASP.NET C#

Hi,
Iam Shakti.
I work as a Software Programmer. I would like to share some knowledge on how a programmer should design ASP.NET Solution so that it remains felxible throughout and after years it is easy to find out what is happening in the code.


In a Solution there should be three layers.

DAL --> Data Access Layer
DOL --> Data Object Layer
BLL --> Business Logic Layer


Now, what these layes should contain.

In DAL Layer, a programmer should write class files in which he/she only interacts with SQL queries, or stored procedures. In general DAL Layer is used for taking values from database and inserting it into Properties(Info Objects), DataSet, DataTables, ......

In DOL Layer, a programmer should define all the properties(variables) that are need in an aspx.cs(Class file). DOL Layer is used to define the properties (which is also called as Info Ojects) of that class file once and used it again and again. This helps in maintaining the set of variable that are required in a class file.

In BLL Layer, a programmer should define the logic that is need. The data is calculated, modified as per the logic and returned to aspx.cs file to finally render the values in controls.



Now how will be the flow of values as per this architecture.

ASPX.CS file will insert values in properties of DOL ---> These info objects are then sent to method BLL which in returns call method in DAL---> The values in accepted in DAL and the required stored procedure is executed. If we are getting any output values then these values are returned back to BLL Layer---> which again returns it to ASPX.CS---> which finally render it to .NET controls.



Pictorial Representation of Architecture in Solution Explorer.

BLL Project
->Class.cs
->Class.cs
->Class.cs

Solution
->aspx
-->aspx.cs
->aspx
-->aspx.cs
->aspx
-->aspx.cs

DAL Project
->Class.cs
->Class.cs
->Class.cs

DOL Project
->Class.cs
->Class.cs
->Class.cs
__________________
Software Programmer (ASP.NET),
Mumbai,
India.
  #2 (permalink)  
Old August 30th, 2007, 03:24 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi shakti_2505270,

I agree with your ideas... If you (or others interested in this subject) would like to take this one step further and see a real-world implementation with UML diagrams, code, setup and a thorough explanation: take a look here:

http://Imar.Spaanjaars.Com/QuickDocId.aspx?quickdoc=416

It presents an extensive examination of your short multi-layer proposal.

Cheers and have fun,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
  #3 (permalink)  
Old August 30th, 2007, 03:43 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Hello shakti_2505270,

This is known as an n-tier Architecture (where n is represenative of a number, in your case 3) and it is a good methodology to follow when desiging applications. In any event, a good explanation.

Imar, nicely done documentation. ^^

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========
  #4 (permalink)  
Old August 30th, 2007, 03:55 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome. Was this the first time you saw them? If so, I need to work on my website promotion a little.... ;)

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
  #5 (permalink)  
Old August 30th, 2007, 03:59 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

That particular quickdoc, ya, that is the first time I have seen it. Besides I don't really think there is such a thing as "to much" website promotion ;]

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========
  #6 (permalink)  
Old August 30th, 2007, 04:05 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hmmm, interesting. The particular ID has two pages of results here at p2p.wrox.com... I agree that you cannot promote a site enough... ;)

Actually, the article is part of a three-part series, and currently is one of the most popular articles on my site (together with the other two parts of the series).

If you have feedback, questions or comments on these articles: feel free to post them here or contact me directly.

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Migrating Project from ASP to ASP.NET hbansal ASP.NET 1.0 and 1.1 Professional 0 September 12th, 2008 05:48 AM
N Tyre Architecture in ASP.NET msrnivas General .NET 5 May 27th, 2008 09:18 AM
architecture of project MunishBhatia ASP.NET 2.0 Professional 1 October 22nd, 2007 09:11 AM
Layering Architecture used in ASP.NET 2.0 Book alexvasc BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 June 30th, 2006 09:30 AM
asp.net architecture kk_katepally General .NET 1 February 28th, 2005 03:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.