# Dojo with Rails

**URL:** <https://www.ruby-forum.com/t/dojo-with-rails/177091>\
**Category:** Rails\
**Created:** [October 11, 2009, 2:03pm UTC](https://www.ruby-forum.com/t/dojo-with-rails/177091 "2009-10-11T14:03:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [October 11, 2009, 2:03pm UTC](https://www.ruby-forum.com/t/dojo-with-rails/177091/1 "2009-10-11T14:03:33Z")

</div>

Hello Group,

I am a PHP programmer eager to use Rails. I want to know weather there  
is any tutorials on how to use Dojo with Rails? I checked out d-rails  
Google Group, it was in mess! It gives me a impression that d-rails is  
dead. Is there there any good and possibly easy and reliable way to  
use Dojo in Rails?

Regards  
A.K.Karthikeyan

---

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [October 11, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/dojo-with-rails/177091/2 "2009-10-11T19:30:56Z")

</div>

Hey Karthikeyan,  
Rails has some pretty cool JS libraries that you can use without  
writing too much JS…  
Unless you have a compelling reason for using dojo - my advice would  
be to try and use  
rails js support - and personally, I’d like to stay away from JS  
writing as much as possible,  
Regards,  
Kashyap

On Sun, Oct 11, 2009 at 5:31 PM, Karthikeyan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> A.K.Karthikeyan
> 
> >

–  
Regards,  
Kashyap

---

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [October 11, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/dojo-with-rails/177091/3 "2009-10-11T19:36:54Z")

</div>

C K Kashyap wrote:

> Hey Karthikeyan,  
> Rails has some pretty cool JS libraries that you can use without  
> writing too much JS…  
> Unless you have a compelling reason for using dojo - my advice would  
> be to try and use  
> rails js support - and personally, I’d like to stay away from JS  
> writing as much as possible,

Unfortunately, that will pretty much guarantee suboptimal code. For  
almost anything nontrivial, it is probably worth writing your own JS.

> Regards,  
> Kashyap
> 
> On Sun, Oct 11, 2009 at 5:31 PM, Karthikeyan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > A.K.Karthikeyan
> > 
> > >
> 
> –  
> Regards,  
> Kashyap

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [October 11, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/dojo-with-rails/177091/4 "2009-10-11T19:49:40Z")

</div>

> Unfortunately, that will pretty much guarantee suboptimal code. For  
> almost anything nontrivial, it is probably worth writing your own JS.

Optimization is a game of compromises I’d say - you have  
readability/maintainability/speed of development on one hand and  
“performance” of the code itself on the other - timing/memory etc.

If I understand it right, ruby language and rails framework tends to  
weight the first category more - and that is where my advice comes  
from.

But you are right…if you know for sure that you are going to run a  
particular version of a particular browser, you might as well spend  
all the time to figure out all the JS special functions provided by  
that JS engine and squeeze out every bit of power.

Regards,  
Kashyap

---

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [July 12, 2012, 1:00am UTC](https://www.ruby-forum.com/t/dojo-with-rails/177091/5 "2012-07-12T01:00:06Z")

</div>

I like that no one actually answered this question and started talking  
about javascript optimization instead.

I’m just bumping this, as I would be interested in knowing the same  
thing  
as the OP, if anyone has as clue.

---

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [October 11, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/dojo-with-rails/177091/6 "2009-10-11T20:12:56Z")

</div>

C K Kashyap wrote:

> > Unfortunately, that will pretty much guarantee suboptimal code. ï¿½For  
> > almost anything nontrivial, it is probably worth writing your own JS.
> 
> Optimization is a game of compromises I’d say - you have  
> readability/maintainability/speed of development on one hand and  
> “performance” of the code itself on the other - timing/memory etc.

I wasn’t talking about performance optimization, but rather about  
general code quality and maintainability.

> If I understand it right, ruby language and rails framework tends to  
> weight the first category more - and that is where my advice comes  
> from.
> 
> But you are right…if you know for sure that you are going to run a  
> particular version of a particular browser, you might as well spend  
> all the time to figure out all the JS special functions provided by  
> that JS engine and squeeze out every bit of power.

That’s not what I meant either. Rather, I meant that too many Rails  
devs assume that the framework will free them from writing JS. It  
won’t. Take a look at the crappy JS that Rails helpers produce, along  
with the fact that writing straight JS is often easier and it will  
quickly become obvious why Rails’ helpers aren’t worth the effort,  
except in the simplest cases (where they can be quite useful indeed).

> Regards,  
> Kashyap

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
