ASP.NET
  Home arrow ASP.NET arrow Page 4 - 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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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 - Web Service Design


    (Page 4 of 4 )

    From the point of view of MS AJAX client-centric architecture, a web service plays the role of a broker agent to connect the client side with the database, and the client-side JavaScript programming can directly invoke the web service via the ready "Client Side Script Proxy." In this application, we'll write two parallel web services, MyDataService and ArtInfoDataService, which are both derived from the DataService class and to be consumed from the browser side in the MS AJAX way.

    Now, right click the project, choose "Add new item," and create two new web services named "MyDataService.asmx" and "ArtInfoDataService.aspx," respectively. Next, open the "MyDataService.cs" file and add all of our required web methods: DeleteRecord, GetAllRecords, InsertRecord, and UpdateRecord. These four web methods will respectively invoke the four corresponding stored procedures -- DeleteRecord, GetAllRecords, InsertRecord, and UpdateRecord --within the WikiDatabase database to perform the basic CRUD operations.

    Also, take MyDataService for example. The above four web methods will be invoked from the client side, in this case mainly by the means of xml-script. Since things are quite similar to the web service ArtInfoDataService, we choose to omit the related enumeration. For the associated details, please further examine the downloaded source code.

     Next we will focus on the user interface design phase.

    Visualize the finish line

    When you run this article-related wiki application, you will see a homepage screen as in Figure 4.

    Figure 4— the runtime snapshot of the homepage of the wiki application.

    Here we use an ordinary <table> HTML element to lay out the homepage while borrowing a bit from the famous codeproject.com website. On the left side of the page, there are a few layer-based categories—when you click the Sections or Manage items the associated sub items will unfold or collapse. Clicking Login in the upper left corner will lead you into another common login page—login.aspx. By clicking items under Sections, for example "Vista," the user will be navigated to the MsgList.aspx page (Figure 5) to view the article titles that belong to the selected category.

    Figure 5—a runtime snapshot of page MsgList.aspx.

    However, only a user with the Admin role can own the ability to open and edit article categories in the editcategory.aspx page (Figure 6), while a common user or a passing guest will be redirected to the login.aspx page. As you see, the right and larger part of the homepage shows directly the rather detailed article category information. Note here, to be honest, that I have purposefully not achieved the functionality of clicking the interested hyperlink from the right part to see the articles. However, you can easily supplement this with the help of the implementation of the hyperlinks added to the sub sections under Sections.

    Figure 6—a runtime snapshot of page editcategory.aspx.

    Rather simple? Yes, it is. But since the sample is mainly built up upon MS AJAX client-centric techniques, there are still some interesting things and knots with it. Let’s dissect them one by one.

    Please check back tomorrow for the continuation of this article.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    ASP.NET ARTICLES

    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...
    - Building an In-Text Advertising System Under...
    - Developing a Mini ASP.NET AJAX Server Centri...





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