Running Java, Play! and Scala Apps in the Cloud

SVJUG held their January meeting on 1/18/2012 with guest speaker James Ward, a Principal Developer Evangelist at Heroku.

James did a rapid-fire 90 minute presentation covering multiple web frameworks. He started each project from scratch, wrote code, configured, tested locally, pushed to Heroku, built and scaled each app.

Whew.

It was fun to watch.

We covered the following frameworks:

Spring Roo

James created the basic "Pets" app using Spring Roo commands. He made minimal configure changes, built and ran everything locally. To push to Heroku, he created a Git repository (the push mechanism for Heroku at this point, didn't sound they support SCP, etc) and then pushed this repository to the Heroku Git repository. After starting a Maven build (interesting in that Git only contained his source and configs, no binaries/jars), all binary assets were obtained, a build was run and then deployed and instantiated.

 

Play Framework

There was a lot of interest in the Play Framework. James built a basic CRUD app, creating a basic input screen and a service that emitted the items in JSON. He showed us how modifying both the markup and the source caused no noticable pause to rebuild (no service tomcat6 restart to reload the binaries)

Utilizing a bit of JQuery, he took the JSON output and included it on the input screen to demonstrate the ease of using Play with JQuery. His IDE was IntelliJ because he noted that IntelliJ v11 has built-in support for the Play Framework while Eclipse currently does not.

His demo was using Play 2.0, which no longer uses Groovy for templates as Play has moved to Scala templates instead. Additionally, he noted that Play 2.0 uses SBT (Scala Build Tools) instead of Maven..

Like SpringRoo, the Play CRUD app was pushed to Heroku via Git, built, instantiated and scaled on Heroku. It all looked quite simple from the audience.

 

Scala with Twitter Finagle

The last demo of the night built an app using Scala instead of Java and used Twitter's Finagle framework (we didn't cover Lift unfortunately). James discussed the trials and tribulations he has had learning Scala ("challenging") and demonstrated building a basic app. Like the prior frameworks, he pushed via Git to Heroku, built, ran and scaled the app.

 

Discussion Items/Links

  • Demos - James put all his demos (including a few we didn't have time to cover) up at http://java.herokuapps.com
  • Bootstrap, from Twitter - highly recommended taking a look at Bootstrap for help with design.
  • Netty - Next gen app server built with Java NIO

Overall, a great talk - we covered three very interesting frameworks in 90 minutes and discussed basic pros/cons of each. Time to try them out!