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 download or watch right here.


Unobtrusive Javascript Presentation from Jason Seifer on Vimeo.


Download Video: ~15 minutes
Download PDF of slides

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)

AddThis Social Bookmark Button Tags: javascript video  | permalink


Comments

Leave a response

Justin BlakeJanuary 04, 2008 @ 09:13 AM

The screencap says it all…


Daniel FischerJanuary 05, 2008 @ 04:49 AM

Lol, agreed @ Justin.

Perfect timing for the vid, thanks!


shigJanuary 07, 2008 @ 11:51 AM

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?


Jim NeathJanuary 08, 2008 @ 05:46 AM

Brilliant presentation.

I’ve got to agree with Justin too, that screencap is awesome.


Neil January 10, 2008 @ 03:29 PM

Where can I buy the Fat Man on a Bus video?


RolandJanuary 19, 2008 @ 02:27 PM

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


Jason SeiferJanuary 22, 2008 @ 03:48 PM

@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?


Jason SeiferJanuary 22, 2008 @ 03:49 PM

Link for UJS4Rails google group posts: http://groups.google.com/group/ujs4rails/browse_thread/thread/bfb6895ca45faaea


ChrisMarch 20, 2008 @ 03:06 PM

What did you use to record the screen along side the video?


jYeckelApril 01, 2008 @ 02:46 PM

This was a good cast and only improved with a clip from Trailer Park Boys!


joahkingApril 24, 2008 @ 07:21 AM

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?


Sorry, comments are closed for this Post, but feel free to email Gregg & Jason with your input. We'd love to hear it.