NetBeans Day Speaker: Charlie Nutter Talks About Ruby, JRuby, and JRuby on Rails

Charles Nutter has been a Java developer since 1996. He currently works full-time as a core developer on JRuby at Sun Microsystems. He led the open-source LiteStep project in the late 90s and started working on Ruby in the fall of 2004. Since then he has been a member of the JRuby team, helping to make it a true alternative Ruby platform. Charles presented JRuby at RubyConference 2005 and co-presented at JavaOne 2006 with Thomas Enebo. Charles blogs on Ruby and Java at

Charlie Nutter

Charlie Nutter

At NetBeans Day in San Francisco on May 7, Charlie will be speaking about Ruby, JRuby, and JRuby on Rails. We asked him some questions about his upcoming talk, and here's what he had to say:

Most of us know that Ruby, a single-pass interpreted language, is a reflective, dynamic, object-oriented programming language combining syntax inspired by Perl with Smalltalk-like object-oriented features. Plus it shares some features with Python, Lisp, Dylan and CLU. How does someone like yourself, someone with so much Ruby experience, describe Ruby?

That standard description works well, but I'd also describe Ruby as highly metaprogrammable, easy to learn, and perhaps most It's been a long time since I found a language as fun to use as Ruby.

Do you see Ruby competing with languages like Java and JavaScript? Or would you say that Ruby is a complimentary language to Java and JavaScript?

Perhaps Ruby competes with JavaScript, since they're in roughly the same half of the language world (dynamic languages), but choosing between different dynamic languages is a bit like choosing between peanut butter and chocolate. People just have their own tastes.

I'd say that Ruby and Java can be just as complimentary as Ruby and C are in the standard implementation. It doesn't make any more sense to say "always use Ruby" than it does to say "always use Java". You choose the best tools for the job, the ones that help you accomplish the task as well as possible. I think that Java and Ruby go together very well, a bit like chocolate and peanut butter combinations.

Why should developers be interested in Ruby?

Perhaps the most important reason is that Ruby gives developers a new way of looking at programming. It supports the same basic OO constructs that Java supports but presents an additional set of features that open a lot of developers' eyes. Of course there's also the fact that Ruby is a very powerful and elegant language, allowing developers to get more done with less code. In the end, though, it's a combination of the two...learning Ruby will make you a better programmer, and continuing to use it will probably make you more productive.

Is Ruby better for certain applications but not others? In what situations should developers consider using Ruby?

Ruby is a great language for the topmost layer of any application, tying together other libraries written in other languages (like Java). It works very well in that capacity, gluing together many libraries with a minimum of code, while providing metaprogramming capabilities to make those libraries easier to understand and consume.

Ruby is also being used to develop "full stack" applications using frameworks like Ruby on Rails. Because of this, more people are realizing that dynamic languages like Ruby truly can be used to develop whole systems, and that their benefits can extend throughout the development process.

How would you compare Ruby and JRuby? There must be some differences between them. What are those differences and how significant are they?

The differences between Ruby and JRuby are largely the differences between writing Java code and writing native C code: Ruby exposes many platform-specific or low-level operations we can't support directly in JRuby. However the lack of those issues hasn't stopped us from running Rails, arguably the largest and most complicated framework yet written in Ruby. So the short answer is that the differences don't impact most users.

Can you use JRuby in the same way you use Ruby?

That is the ultimate goal. We're pretty close to that point, but JRuby may never be the best option for short-running scripts (JVM overhead bites us a bit here) or for when you really need those low-level functions. But in general any application that's "pure Ruby" should work just as well with JRuby as with Ruby.

Is Ruby on Rails on open-source framework for developing web applications that is built around Ruby?

Ruby on Rails is a full-stack web framework providing a very agile approach to web application development. Everybody would agree that Rails has changed the way we look at web development, on any platform.

What is JRuby on Rails? And how would you compare JRuby on Rails to Ruby on Rails?

JRuby on Rails is virtually the same as Ruby on Rails, only it has the further advantage of running on the Java Virtual Machine. Our goal is to run Rails on JRuby directly with as little modification as possible. Today, most "pure Ruby" Rails apps will run well on JRuby with only minor configuration tweaks, so we've mostly achieved that goal.

What are the main reasons developers should be interested in using JRuby on Rails?

JRuby on Rails will provide new, easier deployment options, more scalable execution, and the stability and reliability of the Java platform. It looks and feels like Rails (and really, just runs the same Rails code as Ruby on Rails), but backed by the powerful JVM and its massive collection of libraries.

Is JRuby on Rails better suited for certain types of applications? Should developers consider it for any type of web application?

People are using Ruby on Rails for all sorts of web applications, and have started to co-opt many of its component modules for non-webapps, too. I think the sky's the limit for what developers can accomplish with Rails, if they have enough imagination.

What does NetBeans 6 bring to the table for Ruby, JRuby, and JRuby on Rails?

NetBeans 6 will have direct support for developing Ruby and Rails applications, providing the "full IDE experience." That means code completion, refactoring, in-IDE app testing and debugging, project management, source control, and all the other features an IDE like NetBeans brings to the table for any language. Many Ruby developers have claimed they don't need an IDE, preferring to just use glorified text editors. That is, until they've seen what's possible with well-written Ruby support like that in NetBeans.

Why should developers use NetBeans 6 and Ruby/JRuby/JRuby on Rails?

NetBeans 6 is really an amazing piece of work, taking the success of NetBeans 5.5 and going another level beyond. I've been using it for day-to-day work even during the development process, and I've been happy with it. Plus, now that there's support for working with Ruby and Rails alongside Java applications, I finally have a complete IDE that allows me to develop in my two favorite languages. NetBeans 6 is sure to turn a lot of heads in the IDE world.

And I think developers need to try out Ruby to really understand what it gives them. Never before have I used a language that made so many things easy while generally staying out of my way. And that's the mark of a good much you can accomplish without banging your head against the wall. Ruby and Rails have accomplished a tremendous amount in that sense, and I'm sure we'll see many more innovations coming out of the Ruby world in the coming months.

Meet Charlie in San Francisco

Don't miss Charlie's talk on NetBeans Day in San Francisco on May 7, 2007, where he will demo Ruby, JRuby, and JRuby on Rails and answer your questions.

Not logged in. Log in, Register