Scott Guthrie, Microsoft's vice president of community, recently revealed Microsoft's latest releases in his "Announcement of Microsoft Ajax Script Library (Sixth Preview) and Microsoft Ajax Script Minifier" blog post.
Among them is a major updated version of the Microsoft Ajax Library (the sixth preview version) released by the Microsoft ASP.NET development team on October 15, local time in the United States. This updated version includes a bunch of new features and improvements to the client-side Ajax library and can be used with any version of ASP.NET (including ASP.NET 2.0, 3.5 and 4.0) as well as ASP.NET Web Forms and ASP.NET MVC projects. Developers can call the Microsoft Ajax library (sixth preview) in two different ways:
Developers can visit the ASP.NET CodePlex website, download the sixth preview and load the library directly into their website projects.
Developers can also establish references by using Microsoft Ajax library scripts on the Microsoft Ajax Content Delivery Network (CDN). Developers simply add the following script tag to their .aspx or .html page: <script src="http://ajax.microsoft.com/ajax/beta/0910/Start.js" type=" text/javascript”></script>
In his blog post, Scott details the major improvements in the sixth preview version of the Microsoft Ajax library:
Allow developers to use better imperative (Imperative) syntax to create client controls. The Microsoft ASP.NET development team listened to feedback from users on previous versions. They learned that when creating client controls, compared to declarative Many developers prefer an imperative approach to code. In this release, they introduced a simple imperative code syntax to create client-side controls and bind them to HTML elements in web pages. This syntax will be fully supported by JavaScript Intellisense in VS 2008 and VS 2010.
A new Client Script Loader has been added, which can dynamically load all JavaScript files required by client controls or class libraries while executing scripts in the correct order. In this version of the Microsoft Ajax Client Script Library is split into multiple JavaScript files and allows developers to download and use only those script files needed. At the same time, in order to facilitate developers to use client controls and separate client script library components, the Microsoft ASP.NET development team introduced a new client script loader (client script loader) in this release. This loader can help developers automatically load all the script files required for a control and execute these scripts in the correct order when the page loads.
Added better jQuery integration so that all Microsoft Ajax controls are automatically rendered as jQuery plug-ins. Microsoft has planned to release jQuery as a standard component of the ASP.NET MVC framework and will add it by default in the official version of Visual Studio 2010. In the ASP.NET Web Forms project created. In the preview version released this time, in order to facilitate the integration of jQuery and Microsoft Ajax controls, the Microsoft ASP.NET development team allows developers to use Microsoft Ajax controls through the familiar jQuery plug-in API syntax and will automatically integrate all Microsoft Ajax controls. Rendered as a jQuery plugin. That is, developers use Microsoft Ajax controls just like jQuery plug-ins.
In addition to the release of the Microsoft Ajax Script Library (sixth preview version), Scott also mentioned in the blog post a new free tool released by Microsoft at the same time-Microsoft Ajax Minifier. This tool allows developers to significantly improve website performance by reducing the size of the JavaScript files that need to be loaded on the page. The tool was created by Ron Logon of Microsoft's MSN development team, and you can download the Microsoft Ajax minifier for free on the ASP.NET CodePlex website. After installation, developers can use the Microsoft Ajax Minifier built-in command line tool to minify JavaScript files on the console command line, or they can choose to load the Microsoft Ajax Minifier into Visual Studio as a custom MSBuild task and Automatically minify all JavaScript files at compile time.
Scott ends his blog with a general introduction to the Microsoft Ajax minifier:
The Microsoft Ajax minifier supports 2 levels of minification: regular, and hypercrunched. When developers use the normal level of minification, the Microsoft Ajax minifier will remove all unnecessary whitespace, comments, curly braces, and semicolons. When the hypercrunched level is enabled, the Microsoft Ajax minifier will minify code local variables. Name, remove unreachable code, etc. to reduce JavaScript file size.
The Microsoft Ajax Minifier download contains the following components:
ajaxmin.exe - command line tool for minifying JavaScript files
ajaxmintask.dll - MSBuild task for minifying JavaScript files in Visual Studio projects
ajaxmin.dll - a component that can be used to minify JavaScript files in C# or VB.NET applications