Microsoft Ajax Client Library is dead, Long live jQuery
I was saddened today by the news that Microsoft has essentially killed the Ajax Library, including the cool client-templates and client data context. It’s not “new” news, but I guess I had missed the nuance that the Ajax Library was dead during the excitement of Silverlight 4 and Windows Phone 7 at MIX.
Originally posted on Stephen Walther’s blog, and brought to my attention via Jef Claes blog (via Kevin Babcock’s tweet), the official line reads something like this:
Microsoft is throwing its weight behind jQuery and making it the primary way to develop client-side Ajax applications using Microsoft technologies…Microsoft is shifting its resources to invest in jQuery.
The developers on the Ajax Library team are now 100% focused on contributing to jQuery and building plug-ins for that framework. That leaves me with mixed feelings…
The Happy Feelings
I’ve been a jQuery user and fan longer than I’ve been a Telerik customer (turned employee), long before Atlas ever existed, and back when Ajax.NET was a fledgling open source project trying to make “Ajax” possible in ASP.NET. In other words, I love jQuery, have believed in it for a long time, and I am happy to see it continue to gain mainstream popularity. Microsoft’s contributions to jQuery are welcome, and it will be great to start forgetting about some of the “less than memorable” Ajax Library syntax.
Microsoft’s first attempt at contributing to jQuery will be in the form of a templating syntax, which if approved will be a big boost to the framework.
The Frown Feelings
All of the above said, Microsoft was really starting to come-up with some cool client-side features in the Ajax Library 4.0. I was an early adopter of the Ajax Library bits, and I’ve been promoting Microsoft’s innovative client-side templates, controls, and data context for more than a year when I speak at conferences. The announcement of Microsoft’s “shift in resources” right ahead of the .NET 4.0 release is like watching your favorite car in the race run out of gas on the last lap. One of my most anticipated improvements in ASP.NET 4.0 is now (for all intents and purposes) DoA.
I get that jQuery is great (see above), but this radical change feels like two or three steps back to take one step forward.
WYSIWYG Software
I know, I know. The Ajax Library isn’t *technically* dead. The Ajax Library isn’t going anywhere. It’s still available, now as part of the Ajax Control Toolkit. And LinqToSQL isn’t dead either, right? Wrong. Ajax Library, like LinqToSql, is now a stagnate technology with no additional investment planned by Microsoft. That means you can use it if you like what you see today, but don’t count on the framework growing with your project. It’s WYSIWYG software. What you see is what you get…forever.
The technical impact
What does this mean to your code? In short, if you choose to follow Microsoft’s advice and focus on jQuery for your client controls, you can abandon in the short-term:
- Two-way client-side bindings
- Client-side controls (like the DataGrid)
- Client-side data context
- Observable collections
You also need to start re-learning your client-side template syntax if you want to adopt Microsoft’s proposed jQuery template framework. Instead of borrowing syntactically from XAML, the new template syntax borrows from ASP.NET:
<!-- {%= %} surrounds template expressions -->
<li>{%= propertyName %}</li>
This is compared to the “old” way:
<!-- Ajax Library templates -->
<li>{{ propertyName }}</li>
<!-- Or, alternatively -->
<li>{binding propertyName, mode=oneWay}</li>
Yes, you can use the Ajax Libraries in the short-term while Microsoft works on porting this functionality to jQuery, but as you can see, the port will not be one-to-one. Using the Ajax Libraries today will guarantee major changes to your JavaScript code in the future.
In the long run, I agree with most that this change towards jQuery is for the better. I am just disappointed Microsoft took so long to acknowledge it and in the process dangled a carrot in front of web developers that’s not worth eating. Here’s to hoping Microsoft is able to quickly bring the cool features of Ajax Library 4.0 to jQuery so we can minimize the pain of this jarring transition!
[In addition to blogging on Telerik Watch, I now tweet @toddanglin]