jQuery vs Prototype re: Rails' helpers

I'm considering switching from Prototype to jQuery but wonder... do the Rails helper methods like form_remote_tag and button_to_remote work with jQuery 'out of the box' ?

I've got 2 apps I'd need to convert: one on 2.1.1 and the other on 2.3.2

TIA, Bill

Bill Walton wrote in post #972936:

I'm considering switching from Prototype to jQuery but wonder... do the Rails helper methods like form_remote_tag and button_to_remote work with jQuery 'out of the box' ?

I've got 2 apps I'd need to convert: one on 2.1.1 and the other on 2.3.2

I understand that the jRails plugin will do at least some of what you want. But as you know, I think that Rails 2's JS helpers are anathema and should never be used, because of the inline JS they create. This might be a good time to drop them.

TIA, Bill

Best,

Aren’t the remote helpers built with prototype?

Best thing I ever did was move away from Prototype.

If your converting to Rails 3, you'll need to change your code anyway. There are no more remote-specific tags. Instead, the tag names are the same as a normal action. Instead, you'll add a :remote => true.

So... while you're at it, I strongly suggest you change to jQuery.

HTH, Dan

Ants Pants wrote in post #972949:

Aren't the remote helpers built with prototype?

Best thing I ever did was move away from Prototype.

Why?

Best,

Why?! Well, Prototype was great to get up and started and do fancy things, but then when I wanted to know how things worked or have more control, I found I didn’t know how to. Having a method that you pass arguments to is great but it isn’t enough.

JQuery is a steeper learning curve but you have more control, your javascript is in js files and not sprinkled around your HTML and you actually learn more about the front end.

I’m a backend developer and hate the front end but it has been kind of fun (but stressful and frustrating) and I have learned heaps.

That’s why. but I guess it horses for courses.

Why?! Well, Prototype was great to get up and started and do fancy things, but then when I wanted to know how things worked or have more control, I found I didn’t know how to. Having a method that you pass arguments to is great but it isn’t enough.

Sounds like you’re more against rjs and link to remote than prototype. I’d say what you say below is pretty true of prototype too.

Fred

Please quote when replying.

Ants Pants wrote in post #973055:

Why?! Well, Prototype was great to get up and started and do fancy things, but then when I wanted to know how things worked or have more control, I found I didn't know how to.

RTFM?

Having a method that you pass arguments to is great but it isn't enough.

Huh? I'm not sure what you mean by this.

JQuery is a steeper learning curve but you have more control, your javascript is in js files and not sprinkled around your HTML

You can do that with any JS framework, or with none. And you should -- JS doesn't ever belong in HTML.

I'm not a Prototype supporter as such, but your reasons for not using it seem pretty specious.

and you actually learn more about the front end.

So, I'll ask again: what properties *of the jQuery framework* make it superior to Prototype in your opinion.

I'm a backend developer and hate the front end but it has been kind of fun (but stressful and frustrating) and I have learned heaps.

That's why. but I guess it horses for courses.

Best,

Calm down, mate!! Jesus, have you lost your toys from your pram or something?

As far I’m aware, I never said JQuery was superior. I am aware of saying it’s horses for courses. I’m also aware that my comments were opinion and not fact, based on my experience with Prototype. They apply to me, is that okay? You may also read back and see I’m a back end developer who can’t stand the front end. Again, from my experience with Prototype and JQuery (plugins and api) I much prefer JQuery. I’m sorry I have an opinion and it doesn’t meet with your exacting standards.

That’s the only answer you’re getting because it’s aggressive hoity toity people like you that get my back up.

Now, go out and either retrieve your toys or buy some new ones.

[...] As far I'm aware, I never said JQuery was superior. I am aware of saying it's horses for courses. I'm also aware that my comments were opinion and not fact, based on my experience with Prototype.

I am afraid that if you make statements such as

JQuery ..., your javascript is in js files and not sprinkled around your HTML ...

which appears to be a statement of fact rather than opinion, then someone will ask you to justify the assertion.

It is necessary to challenge such statements so that others finding the thread will understand the issues.

Colin

Ants Pants wrote in post #973159:

> Having a method that you pass arguments to JS doesn't ever belong in HTML. > marnen@marnen.org To unsubscribe from this group, send email to

rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscribe@googlegroups.com>

. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Calm down, mate!! Jesus, have you lost your toys from your pram or something?

Insults are not necessary. And I was quite calm when I wrote that.

As far I'm aware, I never said JQuery was superior. I am aware of saying it's horses for courses. I'm also aware that my comments were opinion and not fact, based on my experience with Prototype.

And I wanted to understand why you prefer jQuery to Prototype. I still do want to understand that, in fact; I'm kind of on the fence about the two frameworks.

They apply to me, is that okay? You may also read back and see I'm a back end developer who can't stand the front end. Again, from my experience with Prototype and JQuery (plugins and api) I much prefer JQuery. I'm sorry I have an opinion and it doesn't meet with your exacting standards.

Uh, what? I am *asking* your opinion. I *want to hear* your opinion.

That's the only answer you're getting because it's aggressive hoity toity people like you that get my back up.

I thought you might be interested in explaining why you prefer jQuery. Apparently it is now somehow unreasonable to ask for the rationale behind your decisions...?

Now, go out and either retrieve your toys or buy some new ones.

I have plenty of cool toys, thankyouverymuch.

Best,