Showing posts with label RAD. Show all posts
Showing posts with label RAD. Show all posts

Saturday, March 8, 2008

Groovy versus Scala

After looking at Groovy and Scala for a bit, I've come to a decision about how I plan to learn and work with them in the near future. I'm going to learn and use Groovy first and then move on to Scala. In this post, I'll explain why.

First, I'll cover the areas in which I see the two languages as similar. They are both script-friendly, object-oriented, can integrate easily with Java libraries and run on a JVM, and make heavy use of closures. Once you're familiar with either of the languages, it's obvious that they'd be great for dashing off a quick script. At the same time, their fundamental OO natures helps you produce (but does not guarantee!) maintainable code. Being able to use and interact with Java code means that you can take advantage of investments in existing technologies and that you can gradually transition a code base from Java to Groovy or Scala. Closures are a very succinct, clear way of expressing solutions to a lot of common problems. Whether or not Java gets them as a language feature, they're unlike to work as well in Java as in these two languages, where they haven't been shoehorned in.

Of course, there are also ways that the languages and developing in them are different. Scala has a greater emphasis on functional programming, has implicit static typing, and (having looked at a decompiled bytecode generated by scalac and groovyc using Jad) appears to translate into tighter code. On the other hand, Groovy looks much more like Java (making the transition easier), Sun has endorsed Groovy, the development tools for Groovy are currently in better shape (and that's without trying what they've got in NetBeans), and Grails seems like a very promising application framework.

So, when I put all of those considerations together, blended them a bit, and took a drink, I decided that Groovy should come first. It helped me make the decision to realize that whatever time and energy I put into Groovy should pay off when it comes time to move on to Scala. I think the languages require a similar mindset and follow similar enough philosophies that once I've got one down, the other should be substantially easier.

Wednesday, February 13, 2008

Groovy and Grails

Since I'm interested in increasing my RAD repertoire, I've decided to spend some of my research time on Groovy and the associated Grails web app framework, in addition to Scala. One nice thing about Groovy for an experienced Java developer is that its syntax is closer to Java than Scala's, while still running on the JVM and integrating nicely with Java. While familiar syntax isn't everything, it definitely can make your first steps into a new language a little easier. Grails follows a similar philosophy to that of Ruby on Rails, a well-known "coding by convention" web app framework, but integrates with established Java technologies like Spring and Hibernate. I wish they hadn't chosen a knock-off name like that, but it still looks pretty interesting. In order to learn Groovy, I decided to buy the book Groovy in Action, after seeing a lot of positive reviews for it on Amazon. I'm also checking out various articles I can find online, including the following: Any other suggestions for me?

Wednesday, January 16, 2008

Experimenting with Scala

Although I'm really comfortable with Java and like it a lot, I came to the conclusion a while ago that I needed to add a language to my repertoire that facilitates rapid development. I know some JavaScript (which is actually a more powerful language than you might think), PHP, and Perl, but none of those quite fit the bill. I've been considering Python and Ruby for a while, but I've recently gotten very interested in Scala. I bought the e-book Programming in Scala available at Artima. I'll let you know what I think of it, along with posting a bunch of useful Scala-related links I've tracked down.