ASP.NET AJAX is not just a JavaScript wrapper library of the “Ajax” technology. It spans both the client and server. Server-side controls let you use Ajax even without using a single JavaScript code. Client-side library provides a lot more functionalities beside Ajax.
1. ASP.NET AJAX Architecture
– Client Side –
The client-side library is called “Microsoft Ajax Library” or “Core Library“.
- Type System
- Components: DOM, JSON, Network, Services
- Application
– Server Side –
The server-side Ajax support is called “ASP.NET AJAX Server Extensions“.
- Server Controls
- Web Services Bridge
- Application Services Bridge
2. Client-side Framework
– Type System –
The “Type System” of the “Microsoft Ajax Library” is to introduce object-oriented programming concepts (classes, inheritance, event-handling …) to JavaScript. This is the foundation layer for other types in the library.
– Components –
Built on top of the “Type System“, “Components” provides resuable modules and controls.
– Application –
The “Application” layer provides an event-driven programming model that you can use to work with DOM or Components. In an AJAX-enabled page, an “Application” object manages the client lifecycle of a web page. It hosts all client components.
3. Server-side Framework
– Server Controls –
ASP.NET provides server controls to let you create an Ajax-enabled page even without using JavaScript.
- ScriptManager
- UpdatePanel
– Web Services Bridge –
You can create a gateway to call external web services from client-side script.
– Application Services Bridge –
You can create an interface to access some of the application services (Authentication and Profile) from client-side script.
4. Microsoft Ajax Library
The Microsoft Ajax Library is organized in client classes contained in namespaces. The root namespace is “Sys“.
- {Global}: Extension to JavaScript itself; All shared members and types; Array, Boolean, Date, Error, Object, Number, String and Type
- Sys: Root name space of AJAX library for base runtime classes; Application, Component and Debug
- Sys.Net: Classes for Network layer; Asynchronous service calls between client-side JavaScript and server-side Web services; WebServiceProxy, WebRequest, WebRequestManager, WebServiceError, and XMLHttpExecutor
- Sys.Serialization: Classes for JSON(JavaScript Object Notation) serialization/deserialization; JavaScriptSerializer
- Sys.Services: Classes for accessing ASP.NET services (authentication, profile)
- Sys.UI: Classes for Components and DOM; Behavior, Control, DomElement, and DomEvent
- Sys.WebForms: Classes related to partial page update; PageRequestManager