Technologies I’ve Been Exploring Recently

code Tomorrow is Edmonton Code Camp 2008, so with that in mind I thought I’d mention a few of the developer-focused technologies I’ve been messing around with lately. Nothing too in-depth, but enough to get a feel for things.

MSMQ – Microsoft Message Queuing
This technology has been around since Windows NT 4 and Windows 95, but I’ve never really used it before. I decided to check it out after hearing John Bristowe sing its praises at ALT.NET Calgary. So far I’m really impressed. I still can’t believe I never looked into it before! I was able to get a decent sample going for both reading and writing from the queue (transactional too) in about 40 lines of code.

Ninject
This is a dependency injection framework for .NET applications. Dependency Injection (DI) is a technique that helps you create loosely-coupled, flexible code. I’ve looked at other DI frameworks, but was always turned off by the XML configuration files. In that regard, Ninject is a lot like SubSonic – everything is done in code! It’s pretty easy to get started with Ninject. Reading the User Guide on the wiki definitely helped me.

Json.NET
I’ve been doing a lot of work with the Twitter Search API, which returns data in either ATOM or JSON format. I figured JSON would be better, as it’s a little more lightweight. The .NET Framework doesn’t understand JSON natively, so I looked for a library to help. I can’t say enough good things about Json.NET – it’s fantastic!

jQuery
Okay this doesn’t really belong on this list, because I’ve been using it for a while now. I keep learning new things about it though, such as the data() method that Marc Grabanski wrote about recently. Very cool. I’ve also been enjoying Intellisense support!

There you go, a few of the things I’ve been exploring lately. I’m looking forward to Code Camp tomorrow! If you’re tagging photos, tweets, blog posts, and other things, use the tag #ecc08. Be sure to keep an eye on the wiki. See you there!

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.