Monday, February 14, 2011

In the Pipeline

Things have been busy, and I have been way less active on this blog than I intended.

But there's a good side to that: there are some important updates and improvements in the pipeline, and that's what's been keeping me busy...

I have been working in three main areas:

  • A Beta2 release of jQuery Templates, which is planned for April.

    This should address a number of issues and requests that have been expressed. One new feature planned for Beta2 is an API to render a template against data, straight to an HTML string, without any dependency on an HTML DOM. This can then be used for direct insertion as innerHTML, and will also enable easy use of jQuery Templates for rendering on the server, as well as improved performance of jQuery Templates when used in the browser for read-only scenarios.

    At the same time all the power of jQuery Templates will still be there, for those that choose to render templates with the full DOM activation phase included, as at present.

    In the case of server rendering, the idea is that the DOM activation can still happen in the browser, against server-rendered HTML. So progressive enhancement scenarios should be relatively easy to achieve...

  • A Beta2 release of jQuery Data Link, also planned for April.

    This involves significant changes to the current Data Link implementation, with much broader scenario coverage than at present. I hope to push my present code for this new version to a Beta2 branch of jQuery Data Link soon, for those who are curious about the ongoing design.

  • Finally, I have been working on a new script loader: JsDefer.

    You can find the current code for JsDefer here This script loader shares a number of features with a script loader which we had released a long way back within the Microsoft AJAX platform (see

    It comes in two versions - a jQuery plugin, and another version that does not require jQuery to be loaded in the page.

    As well as providing some of the features we had in our Microsoft AJAX script loader, JsDefer also takes advantage of the concept of a "Deferred" object, to facilitate working with asynchronous processes (in particular, of course, the process of dynamically fetching a script and loading it into the page). The recent jQuery 1.5 release uses Deferred objects in the context of AJAX requests, so JsDefer is designed to work 'hand in glove' with jQuery 1.5 AJAX requests, among other scenarios. 

I plan to publish a blog post on JsDefer very soon, with an initial dive into how it works and the scenarios it addresses.


  1. Very interested if declarative data linking will be an option with templates, especially how they would handle linking to check boxes and html selects. For example, we send only the selected options to the client, but the check boxes would include all available options.

  2. @Zachary: Yes, the Beta2 of Data Linking should definitely allow linking to check boxes and selects. Currently I am working on considerably broadening the set of scenarios for data link, but I have not yet established the details on linking to selects...

  3. I see that the last versions are from Mar. Is there still a beta 2 planned for this month?

    It's been a year and jquery templates and daatalinking are still waaaay behind where the MS AJAX Library was in this area. I would have hoped that after all the fanfare about MS cooperating with the jquery team (and screwing us all by leaving us out to dry regarding the client templating MS had already started) that things would be farther along by now. It's completely ridiculous how this has lagged.

    If I render a template from an array and datalink it and then change the name of 1 record via the form element, the form elements for the name of successive records change as well. Also, changes to child elements that are arrays don't seem to be tracked or linked back to the original object at all. I've wasted an entire day on those two issues alone. Please let us know if these issues are fixed in the upcoming beta.

  4. @Chris: It's six months since they were announced as official plugins, not a year :). I waited to reply to your comment, because of the following announcements that were about to come out:

    So the result is that a lot of work has been going on, but the specific roadmap is different. For templates it is now owned by jQuery UI. But Data Linking is for the moment independent of the jQuery UI team. That doesn't mean that Data Linking will lose momentum, and in fact I have done some very extensive work on moving Data Link towards and beyond where it was with Microsoft Ajax, especially in its integration with templates. The preview for that is now available here: In fact the presentation I just gave at the jQuery Conference included showing the preview of that ongoing work...

  5. @Boris: Looking at the project history on github it dates back to Mar 2010, and Stephen Walther made the announcement via his blog in Mar 2010 about MS dropping the awesome AJAX Library in favor of the jquery effort. So outside of being announced as "official plugins" the project and effort have been around for over a year and are still miles from being near the functionality offered by the discontinued MS AJAX Library even at its preview 6.

    Only getting a "rendered" method, only being able to reference the template via selectors on an element, not having an index without a kludge to call inArray, not easily having two-way binding without using a form or specifying every element - are all vast shortcomings compared to its predecessor. And they're all outside the plugin framework being changed. I've made multiple attempts to switch, but always have to go back to the MS AJAX Library preview 6 after a couple of days of headaches.

    I realize you personally may have been doing a lot of work regarding the plugin framework change but this project seems an awful lot like when MS supposedly got behing a Facebook API that took forever to get any traction at all leaving MS developers well behind the curve.

    Thanks for the reply and the information about the jsviews. They look interesting and promising. I just hope that they materialize soon.

  6. @Chris: Yes, I understand what you are saying. And as for the MS AJAX Library, that was basically created based on prototypes from me and ongoing development from Dave Reed. I was in there from the beginning. The DataView, DataContext, Script Loader etc. were all my work and design initially. So I certainly do care, personally about getting those scenarios supported at the level we had then and beyond.

    I believe full integration between Data Linking and Templates has immense potential and value, (see this demo page) so I very much hope we can take the JsViews work forward to a V1 product, and that the JsViews can also integrate well with the new jQuery UI Grid, which I am also contributing to.

    But that said, I have to work within the constraints of resources that MS is able to allocate to this work. This last year I have been the only developer at MS working on these jQuery contributions, so this obviously does mean things move more slowly than you or I would ideally want...

  7. It looks like JSViews will be cool and I thank you for your work on it.

    As it stood though, the MS AJAX Library was so functional, that it was able to be used in production even at its preview stages. It would have been nice for MS to wrap that up before dropping it completely and leaving us with absolutely nothing over the last year+ while we wait for jquery templates to be completed or even to the same level that the preview was from the AJAX Library.

    It's extremely frustrating that MS makes these announcements about working with other technologies (like they did with their Facebook API) and then only dedicate minimal resources/bandwidth to it - basically leaving us all out to dry.

  8. Hello, I've tried to use JsViews and would like to make s suggestion about the API.

    $.render method takes template as first argument and data as second


    $.link method takes data as first argument and template as second.

    Would not it be better if both signatures were identical

  9. $Alex: Yes, thanks, I agree, and was considering that change. Historically
    $.render( template, data ) was chosen by similarity with
    $( template ).render( data ).

    $.link() as was added later, and needs to support both
    $.link( data ) and
    $.link( data, template ),
    so has to be in that order.

    I have now made the change to $.render to be
    $.render( data, template ).