jQuery Session at RailsConf
If you’re at RailsConf, please come by room c125 on Thursday night at 9:30pm and join in the discussion. I’ll be chatting about my ongoing work on jQuery on Rails, and should have some code to demo if anyone would be interested.
If you’re interested in hearing about how others have solved problems regarding the integration of jQuery with Rails, or just want to share something cool you’ve done, swing on by. See you there!
Since I last publicly discussed jQuery on Rails, Iâ€™ve gone down a lot of avenues, and written a lot of code, and came to some conclusions:
- The biggest problem faced by jQuery developers is not simplicity (which, again, you get for free in the library), but difficulty in including the correct jQuery â€œmodulesâ€ in the Rails views that require them.
The most common problem with using jQuery with Rails in an app of moderate or higher complexity is the trade-off between including everything in a single application.js (which can lead to serious slowdowns in larger apps) and having multiple, modular files (which are a serious pain to include correctly as needed).
This is a problem for jQuery users who want to use Rails more than Rails users who are used to Prototype helpers and want to be able to use the jQuery library as a drop-in replacement. In the first release of jQuery on Rails, I will be targeting jQuery developers who want to work with Rails. In other words, jQuery on Rails is for you if you know jQuery or are willing to use jQuery.
With all that said, what does jQuery on Rails actually do?
So in short:
- Use include_jquery in your layout
- Youâ€™re done