Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Large Scale ASP.Net Web Application Architecture

  Asked By: Harley    Date: Mar 27    Category: Asp.net    Views: 2566
  

Does anyone have any suggestions for a fairly large web application
written in ASP.Net? Specifically I'm looking for information
pertaining to how the code should be laid out.

The application will have a lot of dynamic areas and I'm not sure it
makes sense to break the application into seperate pages. In
standard ASP this was easy to do by creating a central point of
control for the application and including all of the necessary
functions/sub routines. I'm not sure how I would do this with
ASP.Net. I would like to stick to the idea of keeping design
separated from business logic as much as possible.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Angie Bennett     Answered On: Mar 27

You will want to separate your application  into separate "tiers," with
the ASP.NET web  pages (the presentation) being in one tier, the business
objects being in the middle tier, and the database being in the bottom
tier.

That is, your ASP.NET Web pages  will be fairly straightforward and
simply, relying on .NET Components to retrieve information in logical
chunks. For example, in the ASP.NET Forums, there are a number of
logical entities, such as a Post, a User, a Forum, a PostCollection, a
ForumCollection, and so on. The ASP.NET Web pages merely retrieve
information from the middle-tier in these terms, and then display the
information. For example, to display the title and author of a post on
a Web page, one would need to only do:

in code-behind:
----------------
Post p = Posts.GetPost(4);
lblTitle.Text = p.Title;
lblAuthor.Text = p.Username;

In HTML section:
-----------------
<asp:Label id="lblTitle" runat="server" />
<asp:Label id="lblAuthor" runat="server" />


The Posts object would have a method called GetPost() that takes in a
PostID and then calls a function called GetPostFromDatabase(PostID).
The GetPostsFromDatabase() method, actually, exists in a separate
middle-tier component, which makes the actual database call. This
tiered structure separates presentation, from business  logic, from data
access.

To familiarize yourself, I would advise checking out the many FREE
source code  projects the ASP.NET has made available. Go to:
http://asp.net/Default.aspx?tabindex=7&tabid=41

There you can find the code for the ASP.NET Forums, the IBuySpy Portal,
the IBuySpy Store, and so on. Examine the architecture  for these
applications, and apply what you learn to your project. Furthermore,
you can check out the source code included with the "Starter Kits,"
which are available at:
http://asp.net/Default.aspx?tabindex=9&tabid=47

 
Answer #2    Answered By: Ray Lawrence     Answered On: Mar 27

I am still having trouble with
one area though. I'm used to having one area that controls the flow
of a given application. It analyzes the application's current state
and then moves the application  in the direction it needs to go. In
ASP 3.0 I did it by using a Case statement. Example:


Select Case Request.From("action")
Case ""
Call PerformMainAction()
Case "SaveData"
Cacll SaveData(Request.Form("data"), DBConn)
End Select

Do I just need to shift my way of thinking from a centralized point
of control to a distributed point of control?

 
Didn't find what you were looking for? Find more on Large Scale ASP.Net Web Application Architecture Or get search suggestion and latest updates.




Tagged: