Rails and Dojo

Anyone have any positive or negative experiences trying to get Dojo to
play nicely with Rails / Prototype / Scriptaculous?

Would people recommend it? Recommend against it? Why?

Thanks,
Brad

Anyone have any positive or negative experiences trying to get Dojo to
play nicely with Rails / Prototype / Scriptaculous?

You could get it to work with Rails no problem but you’ll basically
just not be able to use any of the JavaScript helpers. Just drop Dojo
into your javascripts directory and use:

<%= javascript_include_tag :dojo %>

And you should be away.

I don’t reccomend trying to use Dojo alongside Prototype and
Scriptaculous though. For a start theres lots of crossover
functionality that is implemented very differently and is likely to
clash (the event handling stuff for a start). Also, to load Dojo,
Prototype and Scriptaculous you’d be looking at upwards of 400K of
JavaScript. I’ve not tried using them together for the above reasons
so I’m not sure if there are any code related problems but I’d expect
that they’d clash in untold ways.

Dojo on its own has more than enough functionality for most of your
needs.

Would people recommend it? Recommend against it? Why?

I don’t see a problem with it as long as you don’t expect to be able
to use the JavaScript helpers or RJS. Personally, I’d love to see RJS
and the javascript helpers removed from the rails core to allow more
freedom for developers to work with other JS libs.

Cheers,

On Jul 24, 2006, at 16:53, Dan W. wrote:

And you should be away.

I don’t reccomend trying to use Dojo alongside Prototype and
Scriptaculous though.

But some helpers generate code that depends on those, you don’t use
them?

– fxn

But some helpers generate code that depends on those, you don’t use
them?

Like I said, if you are using another JS lib such as Dojo you are best
of learning to live without the helpers.