Play, Roo and a little of Django

12 01 2010

I start my own development and consulting startup-one-man-army company, a risky move on this times, but I hope that will generate profits in this year and in the nexts.

Weapons and choices

As developers, all we have a set of weapons to defeat different enemies, seasoned developers know that non exists a golden hammer, and different problems require different tools, even different mindsets.

Coming from the “Enterprise” world I develop a skills set for kill “big behemoth” projects, my tools include Stripes/Flex/Spring and I’m very comfortable with all them.

But in the small startup kingdom is very hard that you will develop a “big behemoth” projects in the first months or years (until you build a good name for your company), so you will develop small web apps with little requirements, and this is not bad at all, you can make a good profit, if you are smart and have good connections.

But trying to develop a small app, with Stripes/Flex/Spring, seems to be a little… overkill and don’t lie yourself, is possible that you spend a day (even a couple of days) setting the whole enchilada (xmls, libs and all the stuff that you need); this is not the worst thing, (but could be better) in a “big behemoth” with lot of tricky requirements (this tools give you incredible power and flexibility with a reasonable cost).  But in the small apps kingdom a couple of days is too much, and when you realize that you don’t need all the fancy stuff is worst, so I start to evaluate some other options.

The usual suspects

In the Java developer community mindset when you talk about productivity (wherever that means) two names shine among others JRuby on Rails and Grails.

Few years ago Ruby on Rails was the king of the hype, conferences, book, developers of all the world screaming “Java is Dead” and praising his new productivity messiah (wherever that means) whom would lead to the promise land. But them few stories from the trenches show that “The Emperor’s New Clothes” are too invisible for some guys. Right now the RoR community is more mature (or I think so) and Ruby on Rails seems to be good enough, but I think that I’ll wait to the Rails/Merb merge to take a look. In the other hand the JRuby on Rails seems to have less “Rock Star” attitude (Disclaimer: I’m writing this based on the blogs and articles that I read, I’m trying RoR but no more than a few tutorials and no serious project) .

Grails is the Java (or JVM) community response to RoR phenomenon, Grails right now have a lot of momentum and now is under the SpringSource umbrella, with lot of press attention and good community support. Take a look, I say; Groovy is nice language, I say; but, shame on me, I’m not able to run the simplest tutorials, lot of strange (and the worst, non-deterministic) errors spawn everywhere and my confidence in Grails died drowned in a pool of EOF exceptions (and other random things), Maybe in the future I’ll revisited Grails, maybe.

The new kids on the block

So I take a look to other JVM alternatives:


I like Python, is good language, and the Jython implementation is really nice too, a lot of Python libs run very well with Jython including Django.

Django is a very nice framework, extremely well documented, very logical, little or no magic, nice ORM (I don’t like the ORM’s anyway, but this is nice),and have a set of apps (plugins in other frameworks) that let you build a standard web app with little cost.

The Django/Jython integration is very good, and his author (@leosoto) is a smart and nice guy, the main problem for me is his performance; each request represent a small peak in the processor performance, that obviously will be corrected with little hacks in the next versions. Django/Jython is good option to Java developers looking for a good RAD (when I was young the first thing that you think when you read this word was Visual Basic 6, ah the good ol’ times) framework.

Spring Roo

First of all I’m a huge fan of Spring related projects, even I take the Spring Core certification exam and pass with a shiny 94% (seems that I’m the first Colombian with this certification), so my opinion I could be a little biased.

Spring Roo is a project that aims to give productivity (wherever that means) to the Java ecosystem.

Roo have a nice shell interface with lot of options and good documentation, This shell let you to create a new maven project in matter of seconds, all correctly configured, nice start.

Then you can build your entities with the shell (a la RoR) and the horror begins. Roo will generate your class, annotated with Roo annotations and a bunch of *.aj files (AspectJ files) that seems (I’m not expert in AspectJ) that only add methods (getter, setter, toString and some static methods for queries with JPA) to the class (not AOP stuff). I never like code generation tools (if you, like me, try the JBuilder 9-X ($5000) EJB 2.0 app-from-database stuff, you know what I’m talking about), for me is like a glorified “copy-n-paste”. The only valuable thing that code generation tools bring is for teach to junior programmers what is smell code.

But the *.aj code that Roo generate seems to be not bad all, but who know? all the code analysis tools that I know don’t work on *.aj, shame on me. So you can make changes on Java class, but don’t expect that compile outside Roo (or maven), but I’m too afraid to change the *.aj files (one of the worst things of code generation tools) that seems that a dead end road

Not only that, you could generate a CRUD GUI based on JSPX and Spring @MVC (Obviously with all the *.aj stuff), but IMHO, Even with the Spring @MVC (that corrected many things like the horrible inheritance tree) included in the 2.5 version, Spring MVC is by far the most unnecessary part of Spring Framework, if Java have a thing this is MVC frameworks (good or bad), we don’t need another one, PERIOD. For me, used to Stripes, Spring @MVC seems very bloated with lot of code even for simple things. In theory you can make an Add On that build your  GUI in other technology, but theres no documentation right now.

Other thing that I don’t like is that the dynamic client parts are implemented with Spring JS that seems like a Dojo wrapper or something like that, well is pretty hard to know ’cause the documentation is near to nothing (a rare thing in a Spring project).

For me Roo will be almost perfect with a Stripes Add On (maybe I’ll make it in the future) and an option that “push” all the *.aj methods in the Java File… but wait a minute this seems a lot like my “BFG 9000” stack to kill “big behemoth”…. never mind

Play Framework

Play is a mind-blowing/fresh-air for Java ecosystem, totally different from all the stuff that exists in Java.

First of all don’t need a Servlet container to run, or compile, and you don’t see the Servlet API (????) and break some doctrinal rules that all Java developers know (public fields, Model classes extends from a Framework class, strong procedural flavor and others). Those engineering trade-offs could scare some guys, but at the end the framework is very solid

IMHO Play Framework is heavily inspired on Django, but have some things that are more polished that Django for example the absence of Forms (that are a little rough) , the routes seem more polished and the template language is a little more powerful (based on Groovy).

In the other hand, Play don’t have all the modules (apps) that Django have, and of course have less momentum.

In future releases, Play Framework will support Scala as development language, that seems like a very intelligent movement, and who knows maybe we’ll see Groovy, JRuby or Jython as development language (or crazy things like Jaskell or Clojure)

Play is a really good framework and I see myself in the future using Play a lot, (maybe I’ll write a plugin for IntelliJ).


I’ll invest some time on Play Framework in the next few months, but is a community driven framework, so is possible that don’t have the fuel to be a mainstream Framework. In the other hand Roo could be better in a near future with some additions, and have the financial support from VMWare, so is almost guaranteed that Roo will be a success in the middle size projects.