Unobtrusive Javascript
by Jason on Jan 03, 2008
At the Orlando Ruby Users Group last month, I gave a talk on unobtrusive javascript. It gives a big picture overview of why you would want to code your javascript unobtrusively. If you haven't been exposed to unobtrusive javascript principles yet or would like to learn more, give it a or watch right here.
Unobtrusive Javascript Presentation from Jason Seifer on Vimeo.
Some topics covered in the video:
- A bit of history and how we got here.
- Semantic Markup
- Obtrusive Examples
- Benefits of coding unobtrusively
- Examples, specifically to Rails
- Guidelines and assumptions you should make when coding javascript
- Graceful degredation
- Namespacing
Special thanks to Gregg for editing the video. Also, if the above description isn't enough to make you watch the video, how about this screencap:
(Click for big)Tags: javascript video | permalink
Comments
Sorry, comments are closed for this Post, but feel free to email Gregg & Jason with your input. We'd love to hear it.
The screencap says it all…
Lol, agreed @ Justin.
Perfect timing for the vid, thanks!
Jason - you mentioned that jquery now has a compatibility layer. However, I tried using jquery thickbox (http://jquery.com/demo/thickbox/) on my app and then inplaceedit (which is either prototype of scriptaculous) stopped working. Do you know anything about this?
Brilliant presentation.
I’ve got to agree with Justin too, that screencap is awesome.
Where can I buy the Fat Man on a Bus video?
By the way: what’s the status of the UJS4Rails Plugin? As far as I see it broke with 1.2 rails and wasn’t maintained since then. I would love to have the functionality back (moves rails js helper outout automatically to UJS).
thx
@shig: The scripts have to be written with the jQuery compatibility turned on. It doesn’t appear that thickbox does this by default. Drop me a line if you want some pointers converting it or see if you can ping the author.
@Roland: Not too sure. The google group says there’s just a couple of modifications you need to get it working (link) but even after that not all events work. Does anyone think it would be worth writing a tutorial on how to do this stuff easily without a plugin?
Link for UJS4Rails google group posts: http://groups.google.com/group/ujs4rails/browse_thread/thread/bfb6895ca45faaea
What did you use to record the screen along side the video?
This was a good cast and only improved with a clip from Trailer Park Boys!
hi, great work, many thanks.
One question, how about making Rails turn the V of MVC into something like V + js. Gaining some goodies like RESTfull js, common place to keep the jssss, and some other for sure.
Am I getting something wrong here? Is that already on Rails Edge?