Sunday, 2 August 2009

jQuery rocks!

I've been most impressed by the way jQuery has simplified coding for the Shuffl user interface.
I've been trying to analyze why this is, and I have two (partial) answers:
  1. jQuery implements a kind of publish/subscribe architecture: a function or plugin is a kind of published service, and a jQuery selector is a kind of subscription to that service. The advantage of a publish/subscribe architecture is that implementations of of the service or function provided are very highly decoupled from implementations of the consumer of that service, which makes for highly modular and loosely coupled code.
  2. jQuery makes the overall code very modular. It is remarkably easy to add a jQuery plugin to an application, and just use it at the point it is needed. I think this is in part due to the publish/subscribe pattern noted above, but also that there's more to it that that, but I can't quite put my finder on what that is. Maybe just inspired design!
I highly recommend jQuery for browser based rich web applications - I've never previously known Javascript programming to be so easy.

No comments:

Post a Comment