To simplify and optimize Ajax application development and improve application design and maintenance using jQuery
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.
- 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.
MicroAjax is already being used in a few production environments, but we have plans for continued improvement including some of the following:
- 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.