1. The user does not have to see the whole page flash blank for every little thing that requires server side processing.
2. Only the required data is sent from the server to the client in response to an Ajax request. This reduces network traffic.
3. Only the required data is processed. So processing of other parts of the page is not needed. This reduces the server workload.
Microsoft created the XMLHTTP ActiveX control way back in 1999. Other browsers have added similar functionality in a native object called XmlHttpRequest (XHR). These objects are used to create and carry out Ajax requests. The technology was being used before the term Ajax officially came into being, and it became widely known when Google used it with GMail and Google Maps. Jesse James Garrett coined the name Ajax feeling the need for an appropriate shorthand. Presumably, he thought of the name while taking a shower in 2005.
What Ajax Can’t Do
There are a few limitations to Ajax calls. The major ones are:
1.It can’t make a cross domain call. The request must be made to a urlwithin the same domain. So, if your domain is www.yoursite.com, therequest must go to a url within www.yoursite.com. It can’t go towww.darth-vader.com or anywhere else. [There are workarounds, likeusing JSONP – although whether JSONP is Ajax is subject to speculation.]
2. It can never ever upload a file to the server.
3. It can’t access files on the client machine.
- AjaxControl Toolkit: The Ajax Control Toolkit (ACT) adds a bunch offeatures and controls to Asp.net Ajax. Previously, this was a standalone project hosted at codeplex. It was primarily used in WebFormsscenarios. With the new-and-currently-in-beta version, the ACT has beenincorporated into the Asp.net Ajax Library. All the controls of thetoolkit are all present and can be used entirely from script. The ACTalso has some server side components which can be used to make customAsp.net Ajax server side control development easier. In addition, theserver side components provide drag and drop functionality to all thecontrols and extenders in the client side ACT library. This makes usingthe controls easier in a WebForms environment, taking advantage of theScriptManager control. While very easy to use with WebForms, it’s alsovery simple to use entirely from script (like in Asp.net MVC or plainHtml). This has been a major improvement in the latest beta as it wasquite cumbersome to use the toolkit before.
- The files reach the website user faster.
- Thefiles, once delivered, are cached on the browser too. Any other domainthat uses the same file causes the browser to use the local cachedversion (since the file’s url is the CDN url, the domain remainsconstant). Hence, other websites using the CDN will load faster too.
- The files are delivered from Microsoft’s servers. This reduces your server network bandwidth usage and reduces costs for you.
- TheCDN supports Http and Https. This means website users won’t get a peskymessage asking them whether or not they want to show non-secure items.
You can learn more about the CDN here: http://www.asp.net/ajaxlibrary/CDN.ashx
Sothat’s it for an overview of what Asp.net Ajax actually is. If you wishto learn more, you can find a whole host of resources here: http://www.asp.net/ajax/