Unveil the Data Binding Architecture inside Microsoft ASP.NET Ajax 1.0 - Part 2
page 3 of 7
by Xianzhong Zhu
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 32628/ 60

Introduction to the declarative programming in ASP.NET Ajax 1.0

Besides the direct JavaScript programming mode, ASP.NET AJAX provides another way to instantiate client-side typesdeclarative programming mode. Please take notice that to use the xml-script feature you must download the Futures CTP package from the Microsoft Ajax website and add a reference to the PreviewScript.js file contained in the Microsoft.Web.Preview assembly. For more detailed study on the declarative programming model under the lately ASP.NET AJAX 1.0, please refer to Alessandro Gallo's excellent series of tutorial on xml-script declarative programming from here. But note that this tutorial has just scratched the surface of xml-script programming, so to grasp this approach of programming you have to study almost every detail of the excellent exampleTaskList Microsoft has provided and even analyzed the xml-script grammar resolver inside file PreviewScript.js.

Therefore, we merely outline the basic steps when using the declarative mode, while let the code snippet anywhere in this series tell you the practical usage.

1.    Design your web pages as usualdefine the HTML elements.

2.    Create the MS AJAX client-side controls associated with these HTML elements.

3.    Manipulate these MS AJAX client-side controls to control the corresponding HTML elements indirectly.

To make declarative programming much easier, MS AJAX has not only introduced many client-side controls (such as Label, Button, InputControl, TextBox, Image, HyperLink, CheckBox, Select, ItemView, ListView, etc.), but also created a few advanced concepts (such as action, behavior, data binding, etc.).

In my opinion, the declarative mode comes into practice at least due to two important things: 1. to simplify the pure JavaScript programming by configuring the needed xml elements or tags and 2. to adapt to the future programming modeseparating the design from the implementation to facilitate development, as well as simplify the course of maintenance, updating, internalization, third-party development, compilation, and deployment, etc. While there exists these strong points with the xml-script declarative mode, from another point of view, this kind of script based on the XML schema makes debugging much more difficult. When I debug the samples I have to resort to the source code of the framework to find the bugs with little help from the error messages displayed. In some degree, this means you have to be familiar with the inner workings of the frameworktoo difficult for common programmers. Moreover, now there does not exist debugging tools to step into the declarative part of xml.


View Entire Article

User Comments

Title: binding the listview   
Name: silo
Date: 2010-08-02 8:14:52 AM
Comment:
the sample code has a crc error when i try to extract it.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-22 2:30:33 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search