David Harris has a brief post about the joys of jQuery where he comments on what, to him, was an unexpected feature that allowed binding of variables, i.e., JavaScript (and ActionScript) support closures. I find it interesting that he thinks this binding "somehow feels wrong" and I've seen the same reaction from a number of people when first confronted with closures.
This binding is what gives closures their power and why they are more than just "anonymous functions". They carry with them the context in which they were created.
It's also an interesting contrast with ColdFusion where variable binding is done at the last minute at runtime and thus you can take a UDF function that references variables.foo (which might be a page scope variable) and add that function to a CFC instance and now variables.foo will refer to foo in the variables scope of the CFC itself.
I think that's why my Closures for CFMX library has proved so puzzling for a lot of folks :)
In this session, you'll learn from John Resig, the creator of the jQuery library, how to build a desktop application with Adobe AIR and jQuery. 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. Although jQuery is typically used inside a web browser, it's now possible to use jQuery to build rich desktop applications.Should be a great (and extremely popular) talk!
I had nothing to do with this project but given my recent interest in jQuery, I felt it was worth blogging about. I think it really shows the power and simplicity of jQuery.


