Microsoft is adopting jQuery moving forward

Just came across some really excellent news for developers. Microsoft’s ScottGu has announced that the ASP.NET team is adopting the popular jQuery library and will be shipping it with Visual Studio moving forward:

We are really excited to be able to partner with the jQuery team on this. jQuery is a fantastic library, and something we think can really benefit ASP.NET and ASP.NET AJAX developers. We are looking forward to having it work great with Visual Studio and ASP.NET, and to help bring it to an even larger set of developers.

I think this is just fantastic. I’m a fairly recent convert to jQuery, but I’m sold. I won’t build another website without it. The most immediate benefit of this announcement is the Intellisense support that Microsoft will be shipping in a few weeks as a free download.

You can read jQuery creator John Resig’s comments on the partnership here. This is an interesting kind of move for Microsoft. Instead of building their own or trying to buy a competitor like normal, they’re recognizing that jQuery is great as it is. Using jQuery will benefit Microsoft, and I’m sure it will benefit jQuery too as Microsoft can submit patches, bug reports, and other things.

Great stuff!

jQuery: Don't build websites without it!

jquery For the last few weeks I’ve been using a JavaScript library called jQuery. The more I use it, the more I wonder how I ever built websites without it! Here’s the official description:

jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript.

jQuery makes all of your page manipulations easier. Best of all, it does so in a consistent, reliable way across all browsers. No more little hacks in your JavaScript to make something work in both IE and Safari.

In general, I’m a big fan of doing things client-side on the web. That might sound weird coming from an ASP.NET developer, since the whole idea behind ASP.NET’s postback model (called Web Forms) is to make everything happen server-side. I think most experienced ASP.NET developers would agree however, that the postback model is crap. It’s flawed, and if you can avoid it, you should.

We built Podcast Spot in ASP.NET, but we don’t use postbacks. ASP.NET is essentially just our rendering engine. We made use of prototype, another popular JavaScript library, but a lot of the code we wrote is just ugly. I wish I had known about jQuery back then. I’m tempted to rewrite everything using jQuery, but I’m mindful of the “if it ain’t broke, don’t fix it” adage.

It’s very unlikely I’ll be building anything new without jQuery though. That’s how much I love it! Here are my favorite things so far:

  • Works in Internet Explorer, Firefox, Safari, and Opera. Cross-browser support FTW!
  • At just 16 KB for the minified, gzipped version, it has a very small footprint.
  • The API feels natural if you already know JavaScript quite well.
  • Chainability – the magic of jQuery. If you’re familiar with object-oriented programming, you’ll love jQuery.
  • The jQuery UI API is much more consistent and complete than script.aculo.us, and the effects seem much smoother too.

To get started with jQuery, just visit the website. You’ll probably also want to take a look at jQuery UI. The documentation is excellent, and there are quite a few tutorials available online.