Project Description

MicroAjax is a set of jQuery plugins and .NET components designed to provide simple, powerful and efficient Ajax centric web application design patterns. MicroAjax is developed in C# and JavaScript and works with ASP.NET 2.0-4.0.

Purpose

To simplify and optimize Ajax application development and improve application design and maintenance using jQuery and ASP.NET.

Methods

MicroAjax intends to improve the Ajax development process as it applies to ASP.NET using the following key components:
  • Control Methods - Using Control Methods for ASP.NET AJAX allows Web Methods in more logical locations to improve encapsulation of logic. It allows additional components like Master Pages and User Controls to contain their own Web Methods similar to ASP.NET Page Methods.
  • Client-Side Templating - Using a modified version of John Resig's micro-templating engine, MicroAjax provides simple and fast client-side templates defined using JavaScript in a way that is similar to existing ASP.NET server-side databinding.
  • jQuery Plugin - jquery.microAjax.js simplifies using jQuery for Ajax calls to ASP.NET. It also leverages a few minimalistic jQuery plugins along with popular design recommendations by Dave Ward to provide a powerful fusion of functionality with a small footprint. Combining Ajax calls, micro-templating, metadata and client validation in an elegant manner allows developers to produce rich client-side content with fewer lines of code and less overhead. This plugin works great with the server-side components here, but also functions without them.

Plans

MicroAjax is already being used in a few production environments, but we have plans for continued improvement including some of the following:
  • Resource Management - Management of client-side resources like JavaScript and CSS has been a pain for a long time. There are several different ways to manage these resources, but there is little support for controlling the order they are added in (for dependency management). Microsoft has added some useful client-side functionality for delayed loading of scripts with dependencies, but this is not always ideal. MicroAjax will have a resource management system that allows Pages, User Controls and Master Pages to register resources in markup or code with support for required and optional dependencies. Support for Less CSS for .NET, minification, caching and intelligent request optimization through resource combination will be provided by this component.
    • As part of the simplification the resource manager provides, it will remove the need for multiple environment-oriented files of the same JavaScript. The MicroAjax resource manager also intends to honor the web applications configured debug settings, supporting debug blocks in resources and applying minification and consolidation only when the application is not in debug mode.
    • Feasibility of providing an option for integrating this with Microsoft's Ajax Script Loader will be analyzed.
    • Research is also being conducted on providing server-side markup processing similar to that of other templated items (Page, User Control, etc.) with .less
  • Client Code Generation - Microsoft's client-side framework is expansive and useful, but generated client-script for Page Methods is not pluggable (for the sake of Control Methods) and ultimately depends on configuration of the Script Manager which can only be contained in one of the many code files for a page. It also references Microsoft's client-side libraries to make the method calls in a manner very consistent with .NET, but these methods tend to be less elegant than jQuery and the dependencies on Microsoft's framework add a lot of bulk and overhead that are generally unnecessary/unused in jQuery based web applications. MicroAjax will generate lightweight client-code based on jQuery and jquery.microAjax with jQuery style syntax to alleviate the loss of functionality from ASP.NET AJAX's ScriptManager.EnablePageMethods and reduce the footprint of the generated code.
  • Client/Server Template Processing - Currently, templating on the server requires different syntax than templating on the client. This requires you to use one or the other, resulting in pages loading and then calling back for data, depending on postbacks to use server templating or a clunky mix of both which requires double maintenance. MicroAjax aims to offer server-side processing of our client-oriented templating, evaluating the template server-side when the page is requested to allow that first page load to come back with data without requiring double maintenance.

Support and Legalities

MicroAjax ships with Control Methods for ASP.NET AJAX which uses reflection to leverage built-in Microsoft Ajax functionality in ways Microsoft hadn't planned for. Use of Control Methods requires special security permission and may not work as expected with future changes to the .NET Base Class Library. We are making an active effort to ensure Control Methods and MicroAjax stay secure and functional but we can't make any promises about what Microsoft will do with their internal object model in the future.

jQuery MicroAjax for ASP.NET is provided "as is" with no guarantees or warranties express or implied, including implied warranties of fitness for a particular purpose, merchantability, and non-infringement.
jQuery MicroAjax for ASP.NET is a project created and maintained by the Extensible Development Solutions Group. "ExtenDev" is a small group of engineers dedicated to making elegant and extensible libraries and frameworks as well as researching extensibility techniques and technologies.

Last edited May 2, 2010 at 5:36 PM by TheXenocide, version 16