Want to stay on top? Ruby Weekly is a once-weekly e-mail newsletter covering the latest Ruby and Rails news.
     Feed Icon

Google Bites Thumb at Ruby; Ports Rails to JavaScript

By Peter Cooper / June 25, 2007

Yegge

John Lam, a Foocamp attendee, reports that Steve Yegge gave a presentation called "Google Rails Clone" that looks into a JavaScript clone of Rails developed at Google. I can't find any other references yet, and John only mentions the basics, but if this is all true, it could eventually become a big deal.. especially if Google open sources it and JavaScript does become the "next big language".

It does sound rather unlikely that Yegge ported the entirety of Rails to JavaScript entirely by himself (although he is a coding god, and one of my own computer science heroes) but I'm guessing more news will leak out of the big G in the near future..

(Update: Ignore previous update.. confusion reigns. TrimJunction is a similar project by Steve Yen.)

Comments

  1. Duane says:

    I'm sorry, I just have to jump in with a Bravo! on the Shakespeare (Romeo and Juliet) reference. Bites its thumb at them? Love it!

  2. Peter Cooper says:

    Haha, thanks. I'm not sure why it was the first thing to come to mind.. must be going soft in my old age :)

  3. adam says:

    "...in familiar languages like JavaScript."

    O_O familiar languages like JavaScript... right...

    "If you know JavaScript, then all the good things you've been hearing about Rails is now becoming available to you through the Junction project. Except, you don't need to learn yet another programming language. You just need to re-learn JavaScript, casting aside your old stereotypes and misconceptions about the language."

    Why not just learn Ruby instead of re-learning JavaScript? If anything Ruby introduces a lot of the concepts utilized in Rails. I would think learning Ruby would make one understand how JavaScript can be more like Ruby. I guess I disagree with his tone when he says, "...yet another programming language."

    I like the fact that someone has taken the time to make something so cool in JavaScript, but I feel like he's just made an overcomplicated solution for environments that are not server and/or Ruby friendly. Not to mention JavaScript still looks hideous.

  4. Anthony Eden says:

    Makes sense to me that Google would attempt this considering how Google Gears works. Online and offline apps all in one language with a Rails clone could gather a decent following...still, I'd be hard pressed to use it only because Ruby is such a beautiful and enjoyable language.

  5. Jboss says:

    crazy crazy Idea, who will use this?

  6. Peter Cooper says:

    I'm guessing much of the official line goes around the limitation of "company wide" languages in Google to C++/Python/JS/Java. Of course, with those restrictions I wonder why they wouldn't just use Django.

  7. Stewie says:

    I doubt they've ported Rails to JavaScript. But they may very well have written a Rails-Django-Pylons-whatever inspired web framework with a lot of good features also found in Rails.

    ECMAscript 4 looks pretty good, so it should be interesting.

    Although Steve Yegge is a good writer I'm surprised to see anyone call him a coding god... just about everything he has done (which is -probably- good, but I don't know) has been closed source at Amazon or Google, so far.

  8. Dogas says:

    This is the missing widget that google gears needs for mass adoption. They have successfully moved the data layer to the browser with gears, now all they need to do is port over a framework that handles requests, retrieves data, processes it, and sends it to the user. What better framework than Rails?

    This has the potential to be *huge*.

    Imagine if, upon login, a webapp loaded your set of data into the browser's DB (through gears), and from then on you interacted with your data locally, ocasionally syncing with the server DB here and there. At the very least that is a good solution to caching and server load.

    That -really- blurs the line between desktop and server-based apps!

  9. Peter Cooper says:

    Stewie: Yegge recently spoke about writing a cross-language compiler.. so it wouldn't surprise me if it was a Ruby-JavaScript convertor of sorts (to a very idiomatic JavaScript, I'd be guessing).

    Donas: I agree, although the funny thing is that it'd be almost like coming full circle.. back in the late 90s there were quite a few apps (which were considered to be the "future" of how things would work) that worked from data on the net and let you also work offline (push clients, as one example). This sort of development is basically the same tech, but wrapped in the pane of a Web browser rather than the desktop ;-)

  10. rabble says:

    I was at foocamp, and created a rails based calendar of the events.

    http://foocal.crowdvine.com/

    There was no session about rails as far as i remember. I did write out all of the session titles, and build the calendar, so i'd know. So i think you're confused...

    If the session did happen and i missed it, then i'm an idiot. :)

  11. Midas says:

    Javascript on Junction doesn't roll off the tongue quite as easily as Ruby On Rails though, eh? :P

  12. Tim Goh says:

    Like the Shakespeare reference. If I may:

    google.find do |you|
    you.name == "Steve Yegge"
    end.bite_thumb ruby, sir?

  13. Juixe says:

    It is unfortunate that their are no details of his JavaScript port of Rails. I have used his JavaScript Template library and tend to agree with Stewie when he says that it 'well have written a Rails-Django-Pylons-whatever inspired web framework.'

    Even though there are not a lot of details there is a lot of code owned by Steve here: http://code.google.com/p/trimpath/

  14. CG says:

    It seems that redoing Rails in another language is the new "Hello World" of this decade. I agree with the other comments about why do we need yet another implementation of Rails? If a developer is not able to learn another language how good are they anyway? Why would someone want to do a Rails app in another language in the first place - what are the advantages other than not wanting to learn a new language - which is something that every good programmer should want to do every year or two anyway.

    I'm still waiting for the COBOL version of Rails- now that would rock!

  15. court3nay says:

    I was also at foo camp, and while I didn't go to Steve's session, I did seek him out afterwards to offer my help. (I spotted his nametag and performed an interception) I really do love coding in JS.

    As John Lam said, by porting rails to javascript, it allows adoption of the framework from within Google. Steve told me that by doing a fairly straight port, they've actually developed several other javascript useful tools and frameworks, which they are working hard to extract. Some of the code is based on internal tools, so they have to either open-source those tools, or remove the dependency. One of these involves setting up a sort of static typing which is more warning that error-raising.

    The main idea as I gleaned it is to allow rails developers to seamlessly transition their code to the goog framework. I may have that completely wrong.

    There will be more information on this over the next few months; I wouldn't be holding my breath for a release anytime this year.

  16. Shadowfiend says:

    The current advantages to doing this in JS could include speed. I haven't seen any benchmarks of JS, of course, but it may be faster.

    Moreover, this further proves the similarities between Javascript and Ruby in terms of power, abilities, and approach. Prototype first showed those similarities. And finally, while people may be willing to learn Ruby, there may still be those who prefer Javascript -- we all have our preferred language. Why not give them the same power if it's possible to do so?

  17. Akbar says:

    Stewie Said:
    Although Steve Yegge is a good writer I'm surprised to see anyone call him a coding god... just about everything he has done (which is -probably- good, but I don't know) has been closed source at Amazon or Google, so far.

    I say:
    Steve Yegge has write this.....
    http://www.cabochon.com/ (down for now)
    It's not opensource.

    Reference:
    http://steve-yegge.blogspot.com/2006/07/get-famous-by-not-programming.html

  18. court3nay says:

    see http://steve-yegge.blogspot.com/2007/06/rhino-on-rails.html for a proper update.

  19. tiro says:

    My coding gods: http://ocsigen.org (and JavaScript is evil ...)

  20. CG says:

    Actually it is kind of cool that we have groovy and other Ruby clones and various ports of Rails to other languages - imitation is indeed the most sincere form of flattery. Keep the feedback and good work coming. I actually loved Smalltalk and it is a shame it never got the credit it was/is due - I guess because people didn't want to deviate too far from the C bandwagon at the time.
    I actually use JavaScript on a daily basis writing several thousand lines of test scripts (unfortunately Ruby is not an option here) and I think it is good - but it is no Ruby - if it were I would be writing several hundred lines of code instead of several thousand - of course your mileage may vary.

  21. Mike says:

    JavaScript rocks. I've written a complete runtime in it for generating single-page apps. I'm writing a BNF based javascript parser for transforming the codebase and generating documentation from it using Rhino.

    Porting the Rails code to JavaScript seems like a logical choice to me. I can't use Ruby on the day job, but the MVC pattern in Rails is solid. Why mess with it?

    You guys seem to forget that Ruby is not an option at Google. Google only allows programmers to do C++, Python, Java or JavaScript. I don't work at Google, but where I work the choices are limited to C#, Java and JavaScript. I actively veto attempts to introduce new languages, because we'd end up with a mess of Delphi, Python, Perl, Haskell and of course Ruby (my favorite).

    Limiting languages is a good strategy. If this means porting an existing framework in another language to something you can integrate into your existing codebase, so be it. (My non-day-job is all Ruby and JavaScript, of course).

    Port Rails to JavaScript and you can run it on the client or on the server. Rhino is a solid piece of work - I'm using it to script up most of the Java server side as well.

    Anyway, JavaScript and Ruby have enough in common that porting code one way or the other is pretty easy.

    JavaScript will be more verbose, explicit and clumsy than Ruby. Unless you feel like adding or overriding functions in the base objects... Which I refuse to do because you'll end up being incompatible with future versions of the language, have nasty conflicts with library code you import and generally provide a much steeper learning curve to people not familiar with your codebase and conventions.

    So Yay! More Ruby love from a Ruby-unfriendly environment (Google).

    Can't wait to see what this guy gets up to next.

Other Posts to Enjoy

Twitter Mentions