Javascript – jRails vs. Prototype


I am not trying to make this a preference question, I am really wondering what people's experiences are with using jQuery and Rails or jRails for development. Most rails users including myself up to now have been using Prototype. However, I am mixing in a lot of jQuery plugins since they are so easy to use and extend.

I am now thinking about moving from Prototype to jQuery for a new Rails project. However, I love the Power of Prototype. Protoype is almost a new language that sites ontop of JS whereas I find that jQuery is like a great scripting language with lots of syntax sugar and chaining.

Anyway, your thoughts would be much appreciated.

Best Solution

In Rails it really all comes down to the helper methods. Are you using any prototype helper methods? If so then you must use jRails to switch to jQuery. But if not then it really does not matter. They are both great. I used prototype a lot before and it is great. But I prefer the selector way of doing things with jQuery so I have switched. Another good reason to not use the helper methods is unobtrusive javascript. The rails helper methods creates messy inline code.