Forum: Ruby on Rails Rails and Dojo

6f94c45fd92acbb3e21c328f6b35298a?d=identicon&s=25 Bradley Mazurek (Guest)
on 2006-07-24 16:42
(Received via mailing list)
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
0727907ae68db2e8ebc1ea1b01f00d69?d=identicon&s=25 Dan Webb (Guest)
on 2006-07-24 16:55
(Received via mailing list)
> 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,
7223c62b7310e164eb79c740188abbda?d=identicon&s=25 Xavier Noria (Guest)
on 2006-07-24 17:24
(Received via mailing list)
On Jul 24, 2006, at 16:53, Dan Webb 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
0727907ae68db2e8ebc1ea1b01f00d69?d=identicon&s=25 Dan Webb (Guest)
on 2006-07-24 17:56
(Received via mailing list)
> 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.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.