ASP.NET
  Home arrow ASP.NET arrow Page 3 - Developing an ASP.NET AJAX Client-Centric ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Developing an ASP.NET AJAX Client-Centric Wiki Application
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 3
    2007-10-09

    Table of Contents:
  • Developing an ASP.NET AJAX Client-Centric Wiki Application
  • The Three-Tier Model and Key Techniques
  • Data Tier Design
  • Web Service Design

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Developing an ASP.NET AJAX Client-Centric Wiki Application - Data Tier Design


    (Page 3 of 4 )

    Now, let’s shift our attention to the database design.

    Launch Visual Studio 2005, click menu item "File | New Website…", and then select the template named "ASP.NET AJAX CTP-Enabled Web Site" to create a new website. Name it AjaxWiki (select Visual C# as the built-in language). After that, the system should automatically add references to the necessary assemblies—System.Web.Extensions.dll and Microsoft.Web.Preview.dll. Also, you should see a ScriptManager server control, the headquarters of the whole ASP.NET AJAX framework, automatically added to the "Default.aspx" page.

    Now, right click the project, select "Add new Item…", and then choose the template "SQL Database" to create a database named "WikiDatabase.mdf." In this application, we add to it only two tables named ArticleCategory and ArticleInfo, respectively. The following Table 1 and Table 2 give detailed explanations on the fields contained in the two database tables, respectively. The following Figure 3 shows the relationship between the two tables.

    After that, we must create four pairs of stored procedures: DeleteRecord vs. DeleteArticleInfoRecord, GetAllRecords vs. GetAllArticleInfoRecords, InsertRecord vs. InsertArticleInfoRecord, UpdateRecord vs. UpdateArticleInfoRecord, which are associated with the typical CRUD database operations. For instance, the stored procedure DeleteRecord is responsible for deleting a record from the  ArticleCategory table while DeleteArticleInfoRecord takes the same action toward the ArticleInfo table. We won't dwell much on these since our main interests don't lie here.

     Table 1—structure for table ArticleCategory.

    Field name

    Type

    Notes

    CategoryID

    int

    Primary Key

    CategoryName

    nchar(50)

    The article category name

    CategoryDes

    nchar(255)

    The article category description

     Table 2—structure for table ArticleInfo.

    Field name

    Type

    Notes

    InfoID

    int

    Primary Key

    Title

    nchar(50)

    The article topic

    FileName

    nchar(100)

    The article file location

    PostTime

    datetime

    The time to write the article

    ReplyCount

    int

    The times to add comments to the present article

    LastReplytime

    datetime

    The time at which the comment is added for the last time

    PostUser

    nchar(50)

    The name of the user who posts the comments

    CategoryID

    int

    The category this article belongs to (also a Foreign Key)

     Figure 3—the relationship between the ArticleCategory table and ArticleInfo table.

    Author's Note: We should also create an XML file named "content.xml" which serves as the template of all XML files since we choose to save the article content using .xml files. However, for brevity, we will not discuss it carefully. For its related content, you can refer to the downloaded source code.

    More ASP.NET Articles
    More By Xianzhong Zhu


     

    ASP.NET ARTICLES

    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT