Saturday, January 19, 2013

Play Framework 2.1 and Scala

After a bit of a wobbly start to the day, I finally got my brain activated and started plotting my next technical adventure.  I've been experimenting most recently with javascript frameworks like angularjs.  I found angular pretty good to work with, once I got over the initial learning curve.  MVC, Dependency injection, testable javascript, all good!  Unfortunately I didn't really realize the hoped for benefit of device specific rendering.  It seems to me that the nodejs server renders html to send to the browser, just like any other framework like grails, spring, jsf and play.  I enjoyed my experiences with Play 1.24 a year ago or so, and thought it would be nice to upgrade and work with scala instead of java.  Turns out, Play makes a good on ramp for scala experimentation.  Here's what I've done so far:

First things first, get play framework from http://playframework.org/.  I downloaded and unzipped the most current (2.1.RC2) and setup my machines path statement (Windows).  From there, I could follow the tutorial at http://playframework.org/documentation/2.1-RC2/ScalaTodoList.

I originally used my eclipse 3.7 JEE for editing after having run "play eclipse" on the todolist project.  Later I found the scala ide plugin for eclipse juno and downloaded and installed them from http://www.eclipse.org/downloads/ and http://scala-ide.org/download/milestone.html respectively.

I added twitter bootstrap to the tutorial app and pushed everything to my github account at https://github.com/sbasinge/todolist.

Now I am really ready to get rolling, but first I need to review the sample apps, in particular the comet and websocket based apps.  I think it would be interesting to create a online card game of some sort that uses comet or websocket for pushing cards, others actions, results, etc.

I'll let that stew for a while.  In the meantime, have a great time experimenting on your own -- and remember it's not as hard to do something, as it is to get started!