designed for people, built for business


what's happening

Is Jakob Nielsen the comeback kid?
20 November 2008
All of a Twitter
20 November 2008
Say hello to Sam
27 October 2008
Bettering Better Bankside
23 October 2008
Progressive Enhancement - Overlays with asp.net MVC and jQuery
19 October 2008
Women in Business
15 October 2008
Who? VuYoo!
30 September 2008
Microsoft finally catch up with us....
29 September 2008
Cross domain scripting
16 September 2008
Lightweight user testing has landed
11 September 2008
UX news feed

Microsoft finally catch up with us....

Something truly remarkable has happened.

Scott Gu has announced that jQuery is to be shipped with Visual Studio.

"I'm excited today to announce that Microsoft will be shipping jQuery with Visual Studio going forward. We will distribute the jQuery JavaScript library as-is, and will not be forking or changing the source from the main jQuery branch. The files will continue to use and ship under the existing jQuery MIT license.

We will also distribute intellisense-annotated versions that provide great Visual Studio intellisense and help-integration at design-time.

We will also extend Microsoft product support to jQuery beginning later this year, which will enable developers and enterprises to call and open jQuery support cases 24x7 with Microsoft PSS."

Well I'm glad to hear that Microsoft have finally caught up with us. At UX Media, we've been using jQuery as our JavaScript framework of choice since version 1.0.4.

For those of you who haven't heard of jQuery, it's a very lightweight cross-browser framework that easily allows you to manipulate the DOM to create JavaScript transitions etc.

For example, if you wanted to add some error text to a div you would write:

 var ShowJqueryError = function() {
    $('#ErrorMessage ul')
        .append('<li>Please enter your login name</li>')
            .parent()
                .show();
 };

This piece of jQuery will find the UL element which is a child of divErrorMessage and append the li error message to the list.

The quickest way to achieve the same effect with native JavaScript is:

var showError = function() {
    var errorDiv = document.getElementById("ErrorMessage");
    if (errorDiv !== null) {
        var errorList = errorDiv.getElementsByTagName("ul")[0];
        errorList.innerHTML += '<li>Please eneter your login name</li>'
        errorDiv.setAttribute("style","display:block");
    }        
 }

The two main reasons we chose to adopt jQuery as our JavaScript framework of choice were:

  1. It's cross-browser compatible out of the box, which means we don't have to write bucket loads of code to ensure a consistent browser spread.
  2. The selector style language (ID and class named base) is so close to CSS that the overhead of adopting it as our framework was low.

An added bonus is that it's quite fun to use too. Making it, for us, the best tool for the job.

Microsoft's support for jQuery is monumental, indicating a further shift in their attitude away from a command and conquer mind-set to creating the best development environment, whatever the tools.