AJAX and New Template engine in ASP.NET4.0

Your Ad Here

The AJAX functionality in ASP.NET 4.0 enables new client data scenarios for page and component developers that allow JSON data from the server to be rendered as HTML in a highly manageable and efficient way. To enable these scenarios, ASP.NET 4.0 includes the following major features:

1. Client-side template rendering.
2. Declarative instantiation of client-side behaviors and controls.
3. Live data binding.
4. Use of the observer pattern with JavaScript types.
5. An AdoNetServiceProxy class for client-side interaction with ADO.NET Data Services.
6. A client-side DataView control for data-bound UI in the browser.
7. DataContext and AdoNetDataContext classes for interaction with Web services.
8. Refactored ASP.NET AJAX framework libraries.

ASP.NET 4.0 includes a new template engine for client development that meets the following requirements:

* Performance — The engine must be able to render a typical number of items using a reasonably complex template before users perceive an interruption in their interaction with the application.
* Simplicity — The template syntax must be very readable and must be optimized for the most common scenario, namely one-way/one-time binding.
* Expression language — Templates must support an expression language to go beyond the simplest cases. The expression language should use familiar syntax, ideally JavaScript syntax.
* Interspersed code and markup — It must be possible to perform conditional rendering or to loop over markup by using code that surrounds HTML.
* XHTML compliance — The template should be able to render XHTML-compliant markup.
* Components — When using the template syntax, the developer must be able to instantiate client-side controls and behaviors that attach to HTML elements in the page or within templates.

Posted in |