Wednesday, January 30th, 2008

Rhino on Rails: JavaScript MVC on the server

Category: Framework, Java, JavaScript, Rails

Cross posted from my personal blog

Last week we posted about Jaxer which offers an approach of turtles all the way down where JavaScript is used on the client and the server.

Then, I got to interview Steve Yegge. Last year, Steve posted about Rhino on Rails, his port of Ruby on Rails to the JavaScript language on the Rhino runtime.

Ever since he presented on the ‘Google Rails Clone’ at FooCamp and he posted about the internal Google Rhino on Rails project, people have been curious to learn more.

  • What does it mean to port Rails to JavaScript?
  • What can’t you do since JavaScript doesn’t have the same meta programming facilities?
  • Rails = a group of Active*, so did you re-implement everything?
  • What do you gain out of having JavaScript all the way down?
  • Does it actually make sense to have jjs? Server side JavaScript generating client side JavaScript? Argh!
  • What is the state of Rhino?
  • Will Rhino support JavaScript 2?

And of course, the big questions:

When do I get to see it!

I happen to be in Seattle at the Google offices, so I was able to ask all of these questions and more. Steve was a fantastic host, and I really enjoyed chatting with him.

This is the kind of video I want to explore at Google. We have many great developers working on cool technology. I want to get them on camera, participating with the community when I can. Sometimes we can talk about products and APIs, but sometimes we will talk about fun ideas and projects that we are working on such as Rhino on Rails.

Anyway, give it a watch and let me know what you think:

This also lead me to the fun idea of Java and JavaScript flip-flopping:

Posted by Dion Almaer at 8:20 am

4 rating from 33 votes


Comments feed TrackBack URI

JavaScript on the client with Ajax in 2002? Hmm…

Seriously though, very cool, I’m definitely going to check this out.

Comment by sentientholon — January 30, 2008

What I’d really like to know is how I could replace JavaScript on the client. I’d so much prefer to have C# or something with more mainstream OO features. I know there is some way to do this in firefox isn’t there?

Comment by JohnDeHope3 — January 30, 2008

The comic was hilarious! :D

Comment by Jack Slocum — January 30, 2008

Commenting just because the comic is awesome. Although I don’t think javascript has the OO features necassary for a well written server-side app.

Comment by tj111 — January 30, 2008

As always, it has to do less with the language, and more with how skilled the programmer is with the language.

Comment by Mikael Bergkvist — January 30, 2008


I don’t agree with your statement. Yes, a programmers skill does make a big difference no matter what language you use – but every language also has its advantages and weaknesses just as much as every programmer does. Great programmer + great language = maximum results.

Comment by jkuhnert — January 30, 2008

I’ll buy that.

Comment by Mikael Bergkvist — January 30, 2008

@Dion, happened upon your blog last night. Thanks for doing the interview. Also commenting just because of the awesome cartoon… I’m surprised he still has all his hair!! ^_^

It was quite amusing when Steve mentioned using GWT for the server side.

@sentientholon, good call… the term Ajax wasn’t coined until 2005, though the infrastructure to do it (esp. XMLHttpRequest) began in 2000 [according to Wikipedia]. Took a while to get the buzz/hype.

@tj111, JavaScript is quite object-oriented, the way of accomplishing OOP quite foreign (based on Self, not C++). Alas, aren’t we all patiently waiting for JavaScript 2 and full on OOP, combined with something like Jaxer or Rhino on the server.

– nathan.

Comment by nathany — January 30, 2008

nathan: “full on OOP”

I guess you mean “full OOP” but… what’s that anyway? What makes some people think that prototype-based OO is any less complete than class-based OO or that it lacks something? Even more on this, why do people associate the second with “just OO”?

Comment by Venkman — January 31, 2008

Really funny :)))
Though Ajax as a word wasn’t invented before February 2005 by Jesse James. In regards to doing Ajax in OO you could follow my link ;)
Fully fledged Ajax writing nothing else than C# and “standard” ASP.NET.

Comment by polterguy — January 31, 2008

Ajax in 2002 was just a nifty/nasty little iframe trick. it was FM at the time… BAU today :)

Awesome comic.

Comment by Marty — January 31, 2008

That comic is!

Comment by ilazarte — January 31, 2008

Leave a comment

You must be logged in to post a comment.