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 https://ajax.asp.net/docs/, 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

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

    • 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;
      [ScriptService]
      [WebService(Namespace = https://tempuri.org/)]
      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
      public class WebService : System.Web.Services.WebService {

         [WebMethod]
         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.

TodoList2.zip