Are Ruby and JRuby groovy enough?
Posted on May 15th, 2007 in Grails, Groovy, JRuby, Languages, Rails, Ruby, Technology | 1 Comment »
So now that Java seems officially dead (that is, after Sun buried this year at JavaOne), one should start looking at what language will take Java’s crown as the CoolestUsefulLanguageOnEarth(tm), the one that will re-shape the Internet.
Granted being cool is not enough for a programming language to dominate the world. Lisp is very cool in my opinion. ML is the coolest thing since slice bread. Way cooler than, let’s say, Ruby. We’re talking about languages made in the 70’s and the 80’s here, and they are still cool. Smalltalk is cool too. None of them ended taking over the programming world.
Being cool and useful seems to give a language a chance to world domination. C was really cool at it’s time and quite useful. So was C++, and of course, Java. Their usefulness was always evident by the fact that these languages are very pervasive, and that they let you develop a wide range of applications.
Being useful is not enough either, although it provides a language a longer life than just being cool. Cobol is very useful. Fortran is very useful. VB is very useful. But, no revolutions happened with those languages. They are very pervasive though, but you rarely see them anymore.
Well, so the story goes that cool and useful languages, at some point in their life, they stop being cool but keep being useful for very long time. Java is definitely not cool anymore, but very useful. People will continue to develop large business applications with Java for a couple decades, the same way people still use C++ today.
So what’s next? Some say Ruby. Some say Python. I say Groovy.
Ruby is a very cool language. There is actually nothing new in Ruby, at least nothing that we haven’t seen in other languages before (30 years ago?), but the language seems to have the right combination of features. Indeed, Ruby would not be cool today if it wasn’t for the birth and posterior exponential growth of Rails. Rails is a very clever web development framework for Ruby that allows to build web applications in a very fast and agile manner. Rails is a RAD without an IDE. Both Ruby and Rails are very powerful tools in the right hands, and right now, Rails developers are very smart people that see eye to eye with the Ruby/Rails developers. I am not so sure Ruby/Rails is so useful. Here are some open questions about Ruby/Rails usefulness:
- How does 5 years of Ruby/Rails legacy look like?
- Once the excellent first crop (class A developers) of Ruby/Rails developers is exhausted, will the next batch of developers (class B this time) be able to properly deal with such amount of power in their hands? Mind you, class B developers amount to 95% of the developer population.
- Rails dictates a “shared nothing” architecture as means to achieve scalability. Can all types of web applications be built around this concept? Is this a hammer looking for nails?
- If I want a Ruby based application to run faster, what can I do?
Python?… I love the language, but so far, not very web oriented.
JRuby? Mmm… that’s an interesting one! From the language perspective, this is Ruby. And you can write Rails applications on it. Sun has done it pretty sweet to fix the need for a “shared nothing” architecture, by allowing Ruby to run inside the Java VM and also inside a JEE web container. The nice thing with JRuby/Rails is that you can use all the available Java libraries from a Rails application. And this is really useful. The caveats? Questions 1 and 2 from the paragraph above.
Groovy? Well, as a language, Groovy has taken a page (or whole sections I would say) from Ruby’s book. Groovy has many of the features that Java lacks but that Ruby has and that make Ruby so cool. The difference is that Groovy’s goals have always been to be “java-like” and also to integrate really well into the Java platform. At this Groovy is better than JRuby. Groovy also has Grails, which is a Groovy based framework very similar to what Rails is for Ruby. The nice thing about Groovy/Grails is that they can be used in close collaboration with Java/Spring. For once, Grails applications are Spring applications and they can use all Java libraries seamlessly. So you could write your kernel classes on Java and the more abstract code (also, the code more bound to change) in Groovy. The code that is executed the most times could be all Java, whiles the rest of the pages (admin, management, etc) could be done in Groovy. Now all of a sudden, you can have the coolness of Groovy with the usefulness of Java in one same package.
Groovy seems both very cool and very useful to me. More than Ruby and JRuby. To the point that I’d like it to be the next language to take over the world as opposed to Ruby. Too bad that Groovy came in late, but I think it has good changes of toppling Ruby as the new King of the Languages. I think the real winner in the not so short future will be the language/framework that is best at seamlessly integrate both regular typed languages with dynamic scripting languages, and so far the Java/Groovy combination seems the best fit to win.
I know that what I am saying is not very PC in the Web 2.0 world. Oh well, somebody needs to take stabs at looking at Ruby/Rails from the Engineering point of view!