rc3.org

Strong opinions, weakly held

Ruby the gateway drug

The current bit of nonsense floating around among people who think in Manichean terms about programming languages is that Ruby is going to kill Java. Like many other Java developers, I’m not buying it. I think Ruby will be quite successful, but it’s silly to say that Ruby will kill Java. Obviously, Ruby isn’t going to kill Java in the enterprise. Java is legacy at this point, it’s carved out a place in the family of languages that will live forever among Fortran, Cobol, and Visual Basic. There’s just too much code out there behind too many crucial systems for Java to ever go away.

But that’s not really what people mean when they talk about “killing” Java anyway. They mean Java will lose its relevance as a community where interesting, innovative things happen as the innovators move to Ruby. I don’t think that’s going to happen either.

As has been pointed out many times before, Ruby on Rails is basically a port of the state of the art in Java Web application development to a dynamic scripting language. It is more than that, of course, but it was designed to bring tiered architecture, the MVC pattern, and easy object-relational mapping to Ruby.

Those are all staples of the modern J2EE developer, so couldn’t Ruby on Rails serve as a gateway to working in Java? There are lots of capabilities that are provided by commercial or open source Java-based libraries and frameworks that are not yet baked into Rails. If you’ve developed applications with Ruby on Rails, once you’ve learned the Java syntax, you’ll feel quite at home writing Web applications for the Java platform. It was a huge step to move from PHP or Perl CGI to Java. I made that step myself, and getting up to speed took a long time.

Ruby on Rails provides the perfect intermediate step. Of course, for many types of projects there will be no need to bring Java into the picture, but if it does become necessary, knowledge of Ruby on Rails becomes a huge advantage.

In many ways, I think that Ruby on Rails is the best development yet for Java developers. It brings more people into the MVC-centric, test infected, object-relational fold, and it gives us a platform that we Java developers can learn that retains all of our best practices but gives us the implementation speed advantage of a dynamic language. I don’t know about you, but I’m much more like to port my PHP applications to Ruby on Rails than my Java applications.

7 Comments

  1. What book would you recommend for Ruby on Rails?

  2. As far as I know, there’s only Agile Web Development with Rails:

    http://pragmaticprogrammer.com/titles/rails/

  3. There’s a few things I either don’t understand or don’t like about Ruby:

    1) The way it uses the database schema for object relational mapping — and no one every talks about using anything else except mySQL.

    2) Its mediocre support for Apache, or to put it another way, it’s odd support for WebBrick and Fast CGI.

    3) The fact that no one ever talks about Ruby outside the context of Rails.

    It seems to me that if Ruby can manage to get support from the average webhost, it will be more of a killer of PHP than anything else. Which, after running into limitation after limitation in PHP, could be a good thing.

  4. Rebort wrote: It seems to me that if Ruby can manage to get support from the average webhost…

    That would certainly be a biggie in terms of cutting in on PHP, but I agree with Rafe on the institutional momentum already behind Java re corporate applications.

  5. TextDrive is one of the only hosting providers that I know of that provides Ruby on Rails as an out of the box option for customers, and as I understand it, they’re having some problems getting it to behave properly in a shared environment. (Apparently it’s not too difficult to write a resource-hogging Rails app that brings the server to its knees.)

  6. has TextDrive published the issues they are having?

  7. I don’t believe so. I based my comment on something overheard in IRC.

Leave a Reply

Your email address will not be published.

*

© 2024 rc3.org

Theme by Anders NorenUp ↑