JavaScript on Rails

With the rise in popularity of the Ruby on Rails framework it was only a matter of time before someone tried to implement it using JavaScript. Of course, when that someone happens to work at Google then all hell breaks loose. Here’s Steve Yegge’s reply to all the hype, which also hints at the evolution of Rhino, which is essentially JavaScript for Java. If you’re not familiar with Rhino, check out what Steve has to say about it:

Rhino…was written with an eye for performance. The Rhino code base reads almost like C code: it avoids allocation and does as much as possible with jump tables to avoid the overhead of virtual method lookups. It has two code paths: a bytecode interpreter that runs in a tight loop, and an optimizing Java bytecode compiler that turns many expensive-ish JavaScript property lookups into Java local or instance-variable lookups. It’s a pretty serious piece of software.

When you start digging into Rhino, you find unexpected depth. JavaScript (unlike Perl, Python and Ruby, at least today) actually has a real specification, and Rhino follows it rigorously, aiming for complete SpiderMonkey compatibility within the bounds allowed by the different language platforms. Rhino also offers rich configurability, has well-defined multi-threading semantics, has a full set of hooks for debugging and profiling, and much more besides. There’s a lot under the hood.

Oh, and Sun is now bundling it with the JDK; it’s javax.script in Java 6. With that kind of endorsement it would have been hard to justify using anything else, even if some language other than Jython or JavaScript had been up for consideration.

With an endorsement like that and the potential for easy integration in an IDE with Google’s GWT you can expect to hear a lot more about Rhino on Rails in the coming year.

New Javascript-Channel.com up and running!

Yes, we’ve updated the look, feel and structure of the javascript-channel.com website. As you can plainly see, the main page is now a blog. The wiki is still here, and easily accessible at javascript-channel.com/wiki and the sidebar to your right. All previous content has been maintained but obviously any bookmarks you had that linked directly to previous wiki pages will be broken and need to be updated.

I’ll admit that the transition isn’t complete just yet. After sitting on this theme for four months, I have to say it’s damn ugly! And the wiki theme is even uglier! I’ll be switching soon to something that isn’t as hard on they eyes, probably something more minimalistic from the awesome plaintxt.org.

So why the swich? Firstly because we switched hosting providers. The channel site is now hosted by the rubylicious textdrive.com so that we can offer a more stable and reliable site. Secondly, because the tools we were using previously lacked certain features, such as security, the ability for people to easily provide code, and a place to provide news and JavaScript related information. The new wiki is a lot more code friendly than the previous wiki, you should be able to just paste JS or HTML code directly into <pre> tags and have it look decent. No more need to escape stuff. We’re also able to implement security to the wiki so that only channel ops can modify pages, if necessary.

So sit back and enjoy the changes. Like I said, we’ll update the look real soon, in the meantime, we’d love to hear what you have to say!