Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 340
ewakened Avatar asked Dec 12 '08 15:12

ewakened


1 Answers

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.

like image 80
Espen Avatar answered Oct 12 '22 23:10

Espen