Why didn’t Stevey just use JRuby?

So Stevey blogged about porting Ruby on Rails to JavaScript so it can run under Rhino on the JVM.

First off I’m jealous. Reading about what it is like to work at Google is like having that rich uncle who won’t even let you wash his Ferrari. Oh well.

So Stevey gets to port Ruby on Rails to JavaScript because he says:

..it didn’t seem like Java was going to be a particularly good match.

and

Java’s different enough from Ruby that the impedance mismatch might have killed the effort, so I decided to stick with a dynamic language.


Hmm.. for some reason that didn’t stop the JRuby folks did it? And maybe I’m just being naive here, but working at Google you would think he, uhh, did a Google search to see if anybody else had done this? A search for “java ruby on rails” reveals that JRuby is number 9 on the list. That didn’t take long did it?

While I commend Stevey for doing his port, it seems that the solution was already at hand. Then again there is always Grails…



Don’t miss anything, subscribe!

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments

You seem to have missed the point. JRuby is not Rails in Java, it’s Ruby on the JVM. To use JRuby he’d need permission to use Ruby, the language, which he doesn’t have.

From the same post: “[At Google] You have to play inside the fence defined by C , Java, Python, and JavaScript.”

It seems the prohibition is at the language level, not at the platform level. Ruby on the JVM is still Ruby, and therefore verboten. He could have used Django (or similar) on Jython, but not Rails on JRuby. Kind of a bummer, but when your rich uncle is that cool, you kind of need to play by his rules, unreasonable as you may think them to be.

Someone out in the blogosphere made the wry (yet telling) comment that porting Rails is this decades “Hello, World!”. I’m not convinced the world needs YARC (Yet Another Rails Clone), but Steve’s accomplishment does make a case for JavaScript being among the pantheon of Truly Useful Languages.

hi there,

Stevey said that RUBY, the language(irrespective of the implementation like jruby, etc) could NOT be approved inside of google.

Therefore, he searched for some other JVM language like Jython but since jython is not being properly maintained these days, he decided not to take that one.

PLUS, since javascript is one of the approved languages at Google, he wanted to see how well Rhino scales to the job. It appears that it did well!!

I hope you NOW understand why he chose javascript.

BR,
~A

I believe Stevey wrote that C , Java, Python, and Javascript were the only language options available at Google for projects on that scale (for the usual reason: to prevent anarchy in support, maintenance, required skills, etc).

All of you are right, I misread it. So Stevey wanted Rails-like functionality but couldn’t use Ruby to do it. Fair enough. Which leads me to my last paragraph about Grails. It isn’t a direct port, but neither would a Javascript on Rails.

Yes, but Groovy is still a language separate from the four he was allowed to use, and thus is still a non-starter.

But Grails is written in and uses Groovy, not java, so it too is verboten.

Grails development is in groovy, which just like ruby, is not an approved language choice at google.

… Grails is Groovy on Rails, Groovy being yet another language he would not be permitted to use inside Google, however Java-like it may be.

You still don’t get it. Like Ruby, Groovy is not C, Java, Python or Javascript either.

That is a fine line. Groovy is just scripted Java. If someone wanted to be a real pain they could say it isn’t Java. Those same people could also say that javascript is allowed but it was intended for browsers, not server side programming. Hell some people say JavaScript isn’t a programming language either (not that I agree).

Groovy compiles to Java, but it isn’t Java. It is truly a separate language and therefor not really that fine of a line. Imagine in a company the size of Google not having these kinds of guidelines, and you’re talking about a maintenance nightmare. I think the options they have available to them are good ones perfectly capable of doing all that is required. I’m sure that the list will change in the future, but I don’t think there’s any reason to change it now.

>He could have used Django (or similar) on Jython,

No, he couldn’t. Most all of the contemporary web frameworks for Python require features in Python 2.3 and the ever-aging beta of JPython is stuck at Python 2.2 compatibility. That’s one of the more frustrating holes in the fabric of non-Java languages for the JVM. You can, these days, run Rails apps (JRuby), PHP Apps (on Resin only, granted) and all the other Java and Groovy frameworks on a JVM now, but not Django.

Programming Tutorials…

I couldn’t understand some parts of this article, but it sounds interesting…

Leave a comment

(required)

(required)