Monday, May 28, 2012

Upgrade to Play 2.0? - Not now

What is the first thing for a seasoned Java developer to leave Spring/J2EE and move to something cool like Play? Of course, its easy setup and improvement in productivity. When I tried play 1.x series, I was very happy. After a few months, I recommended and used it for one of our internal projects and also successfully hosted it to heroku. It had matured a lot with new and useful modules.

Then saw the announcement of Play 2.0 which was completely being rewritten in Scala. As every other person, I too was excited about it and the twitter feed was full of praise once its released. And add on top of it, its inclusion in the Typesafe stack that created more buzz. So, with lot of excitement, I wanted to evaluate so that I can upgrade my application to this latest and greatest version.

First, I tried the Play-Scala module with their todoList example. As promised, the setup time was negligibly small and it lived up to the promise. But the real problem started right after that. Any change to your source code and the next page load takes a lot of time. Its definitely a lot better than the old J2EE-RAD setup but very bad when compared with its predecessor. I tried it with the java module and faced with the same issue.

There are some promises on their groups that they are working on improving the performance which is good. The two main issues must be the compile time of the Scala code (this is pure guess considering similar issues in other projects) and new feature that compiles and watches more components. Hopefully, they figure out a solution soon.

Until then, I'm going to stick with Play 1.2.4 for the application that we developed. As of now, we don't have any specific need to upgrade it to the next version. But its a definitely good thing to upgrade the application to incorporate any such things in the future.