Using a Motorized Wheelchair Because you’re too Lazy to Walk
So true. I am tired of seeing people doing stuff like:
- Simulating even the most trivial things like $(‘element’).toggle(); with RJS
- Doing all of the above obtrusively – who cares about the totally littered HTML, just get it done somehow
And I am talking about trivial/mundane tasks above – what if you’d like to create your own custom widgets? Optimize your code? Rely on the browser for various things not supported by rails out of the box (e.g. in-browser caching)? Manipulate the DOM? Prototype/RJS won’t do everything instead of you.
Ok, I’ll Still Stick with RJS and I Like it Obtrusive!
Ok, you have been warned. Suddenly It seems not I am the one stuck in the 1990s… but whatever. Ignore JS in your Rails apps at your own peril.
Then there is DOM scripting. You would be amazed to know how powerful DOM manipulation can be once you learn the ropes.
Let’s Hit the Waves
Douglas Crockford’s site looks like a good starting point.
On the book front, I am planning to get these titles (I am not using any referral crap, those below are plain amazon links):
- Accelerated DOM Scripting with Ajax, APIs, and Libraries by Jonathan Snook et al
If you have any suggestions, comments, ideas on how to do this thing better, please leave a comment.