Microsoft AJAX Library at the AJAX Experience

I had a great time at the AJAX Experience Conference today.

  • John Resig did a good talk on choosing the right Ajax framework for you. He laid out four attributes you should use when you judge an Ajax library…. While he didn't mention the Microsoft AJAX Library, I think it stacks up very well in these attributes.

    • Documentation – By this, John means how well is the framework explained, are their great examples? Microsoft Ajax Library has great docs already, we have several fulltime User Education folks working everyday to make them better. This include partical walkthroughs such as Installing ASP.NET AJAX and How To: Call a Web Service from JavaScript as well as details such as the JavaScriptSerializer class.

    • Community Support – John measured this by how active the lists are. Which is a proxy for how quickly you get answers when you get blocked. As of right now, our community site have 383 people on line, 140 unique threads just today. As if that is not enough, when we ship, the Microsoft AJAX Library will 100% supported by Microsoft Product Support Services. That is 24x7x365 phone and forums support by fulltime people that are focused on finding solutions or we will fix the product. No other AJAX library offers this level of support.

    • File Size – The Microsoft AJAX Library is just over 20Kb when it is scrunched and compressed. Based on John's analysis of this very much in line with other AJAX frameworks.

    • Popularity – This is a question of who is already using the framework. Helps to speak to maturity and completeness. At least you will know you are not in it on your own. The Microsoft AJAX Library has a good set of case studies, and Microsoft has some big name sites that we will be looking at for the Microsoft AJAX Library very soon. This is not to mention the HUGE number of ASP.NET developers that will undoubtedly make big usage of this technology when it ships!

    While I am not sure these are the definitive set of attributes to use in making your decision, it is good to know that the Microsoft AJAX Library stacks up pretty well on these attributes.

  • My talk was a lot of fun. I was not surprised to have several folks that were already using ASP.NET and the Microsoft AJAX Library, but I was happy to see a fair number of folks checking out the Microsoft AJAX Library for the first time. A few things that I think really resonated with this crew.

    • The Microsoft AJAX Library works in all major browsers (Safari, FireFox and IE)

    • The Microsoft AJAX Library does NOT require ASP.NET, IIS, or even Windows on the server.

    • The Microsoft AJAX Library has great support for WebServices and JSON.

    • The ASP.NET AJAX Extensions use of the AJAX Library making it super easy to build AJAX apps with no JavaScript… or even code required!

    A couple of the very simple examples I showed how easy the framework is to use… Think of what this would look like with using XmlHttp directly? Think of all the amazing things you can with the full power of the .NET Framework on the server and the Microsoft AJAX Library on the client!

    • Default.html

      <title>Untitled Page</title>
      <form id="form1" runat="server">
      <asp:ScriptManager ID="ScriptManager1" runat="server">
      <asp:ServiceReference Path="WebService.asmx" />
      <button onclick='WebService.HelloWorld(onComplete)'>ClickMe</button>
      <div id=myDiv></div>
      <script type="text/javascript">
      function onComplete (results) {
      var mydiv = $get('myDiv');
      mydiv.innerHTML = results;

    • WebServices.asmx

      <%@ WebService Language="C#" Class="WebService" %>
      using System;
      using System.Web;
      using System.Web.Services;
      using System.Web.Services.Protocols;
      using Microsoft.Web.Script.Services;
      [WebService(Namespace =]
      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
      public class WebService : System.Web.Services.WebService {

         public string HelloWorld()
      return "Hello World!";

    The other simple example I showed is about using UpdatePanel to make an ASP.NET 2.0 app look like a first class AJAX app. See attached for the project files and my slides.

  • The panel tonight was a really great. I know I learned some stuff. Here are a few things that stood out to me:

    • Someone in the audience pointed out that the debate about AJAX libraries seem to have moved up the stack. More around what UI widgets they offer rather than basic XmlHttp abstractions and JavaScript language extensions. I totally agree, there is only so much differentiation frameworks can do at that level. Now it gets more interesting as these UI widgets can't easily be ported from one base framework to another, so this will start to really draw some interesting differentiations over the next 6 months to a year.

    • Someone on the panel mentioned that "Better is Simpler". When we talk about a web app getting "better" by using AJAX, what we *should* mean is the app got easier to use, has less surface area and is more intuitive.

    • It is clear that the Atlas name is still sticking at the ASP.NET AJAX Extentions is mouth full for this group… so, as you can see from this post, I have decided to be more precise and refer to just the JavaScript implementation by its new official name… the Microsoft AJAX Library.

    • Several of the questions centered on doing as much as possible in the browser rather than on the web server. I (and many of the panelest) suggested balance is what is needed here. There will always be a need for server side code. The AJAX model just changes the focus from being a project UI model to being more about providing an integrated set of application level services (authentication, role management, profile, etc). The marriage between ASP.NET and the Microsoft AJAX Library is a perfect fit for this.

    • There was another set of questions on performance or network load of AJAX apps. Clearly there is no definitive answer here as it varies hugely based on your scenarios. However one of the panelists pointed out that in many cases you should be measuring the user perception of performance of the app rather than just raw throughput. That it is might technically be more bites of the wire to do several async network calls to populate a list rather than one big request, but the forum likely offers a better user experience.

    • An interesting question was asked about the ethics of using AJAX techniques to say, send user data to the server while the user is in the middle of filling out a form so you have it even if the user doesn't hit submit. This is of course easy to with AJAX, but is it right? IMHO, this not a technical question – it is a question of what the users mental model of what happens is. Users have been trained to understand that their data isn't recorded until they hit submit. In fact IE has long warned users of this the first time there is a form post-back. Does this mean you can't cache user data or even implement an AutoComplete textbox? I don't think so… I believe all those are fine as long as you don't record the users data as if they had submitted the form.

I am looking forward to tomorrow! If you are at the show, drop by the booth and say "hi". I'd love to hear your thoughts.

Comments (9)

  1. John Resig says:

    Hi Brad – Glad you enjoyed my talk. I just wanted to expand on your points real quick: I also discussed how that most libraries have some form of the "big four": DOM, Events, Animations, and Ajax. Doing a quick look through the documentation (which is pretty good, considering that it isn’t launched yet) and the code base I’d classify the Microsoft Ajax Library as having:

    – Moderate DOM Traversal, only basic get by ID – no apparent DOM creation methods.

    – Acceptable DOM Events.

    – Good Ajax Support.

    – No Animation Support.

    Since the library is still quite new, I suspect that you could best enhance it by improving the DOM traversal and modification support. (I’m not sure how you guys feel about Animations – but some basic ones would certainly be helpful) Even with just the better DOM support the library would already be ahead of Prototype in directly useful functionality. I’ll definitely be watching the client-side version of your library, I suspect I’ll be hearing much more about it soon.

  2. Name (required) says:

    "Microsoft Ajax Library has great docs already…"

    Come on, is this a joke?

    It’s the worst documentation of all Microsoft products.

  3. vikram says:

    I have a problem with the new beta version. They do not come with the Microsoft.web.ajax.dll. The reason you people give is that this is installed in the GAC. But what if my hosting provider does not allow it to be done. That means I cannot upgrade and use the new feature and advantages. Do you have any answer to what I should do

  4. BradA says:

    Thanks John…

    On the Animation support, you should check out our Animation Reference.. This is part of the Ajax Toolkit that goes with the Microsoft Ajax Library…

    As far the docs go, I’d love to have your feedback on where we can get better…  it is just a beta, and we have plans for LOTS more content.  But if there are particular things we should be aware of please let me know!

    Vikram, do you mean the Microsoft.Web.Extensions.dll?  That is installed in the GAC with the beta such that we can do servicing of this assembly – it is part of the “fully supported for 10 years” thing.  We are actively working with Hosters to get them to install and generally we don’t have a problem getting most hosters to be early adopters.  If there is a particular hoster you are interested in, please do let me know.  

    As far as workarounds, you can of course us the Microsoft AJAX Library directly without needing the Microsoft.Web.Extensions.dll at all.

    BTW, the zip file for the Microsoft AJAX Library can be installed from here:  and, yes, the license here is just for the beta… the one for RTM will be very clean and will allow modification and redist.

  5. For the most part I’m very pleased w/ the new beta build (w/ the exception of using a master page w/ a virtual earth map and an update panel seem to cause a temporal rift in the universe).

    I have to agree though, documentation is still pretty horrid. There still isn’t a solid reference for xml-script which makes using an exercise in futility. Please, please, please, write some decent documentation. Please…

  6. I saw Jack in my talk at The Ajax Experience conference yesterday and was happy to see that he wrote

  7. This week I’m attending the AJAX Experience conference up in Boston, Ma. There are couple of folks from

  8. Steve Calvert says:

    One issue I find consistantly with Microsoft docs is that its examples are painfully simple. There aren’t good examples of advanced implementations, which results in a considerable amount of time spent deciphering code. Don’t get me wrong, I love digging in and figuring things out, it’s just that I don’t always have the luxury of time…

    Something like from Nikhil, as an example.

  9. There seems to be a good bit of discussion about Beta 2 and its Binless existence. For those of us who

Skip to main content