JavaOne 2012: Modern Web Development with Play Framework 2.0

My second session on Tuesday was my first non-keynote session at JavaOne 2012 outside of the Hilton. Peter Hausel (Typesafe) gave the presentation “Modern Web Development with Play Framework 2.0” was held at Cyril Magon I in Parc 55. For some unexplained reason, they did not allow attendees into the room until ten minutes before the session started. It was a small room and ended up being over 3/4 or more full.

In a slide titled “tl;dr“, the speaker talked about DRY, out-of-your-way configuration, avoiding bloat, avoiding verbosity, using Java 7, using fork/join (or Akka) and NIO, going asynchronous when possible, favoring immutability, favoring fluid interfaces, and questioning the status quo.

Play Framework 2 provides a “development console for RAD” and is “type checked all the way.” Play 2.0 supports “asynchronous programming techniques” along with support for “front end technologies” (LESS, Clojure, Require.js, CoffeeScript).

Play is built upon and/or supports Java, Scala, akka, HTML5 Web Sockets, and Netty.

The speaker showed a slide stating, “Simple tasks should be simple, hard task should be possible, and focus on developer happiness.” He then went on to show a slide on the “Development Console.” One slide on the Development Console showed a compilation error and how the line of code with the error is highlighted within in the web browser. The error message appears at the top and the offending line is highlighted in red. He showed several different types of errors including those related to compilation of JavaScript/CoffeeScript code. One error provided a clear explanation of why certain JavaScript/CoffeeScript did not work in Microsoft Internet Explorer.

The speaker showed a provided template, but pointed out that this mechanism is extensible and organizations can create their own templates and plug-ins.

Hausel moved onto showing code examples. The code seemed fairly fluent, straightforward, and readable, even without having any significant experience with Play or Scala. I certainly could not write it right now, but I could read it. He showed implementation of a application controller (with several static functions) and model class and showed how to hook all of this up to a Redis plugin.

It was difficult at times to hear in this presentation due to competing sounds such as voices from nearby conference rooms and “everyday noises” within the room. The loud opening and slamming of doors in the back as late arrivals came in and others left early added to the difficulty (I’m not the only one particularly bothered by this as shown by this this Tweet that appeared about the same time I wrote the previous sentence). In general, this is type type of thing that could make the difference between selecting between two presentations in the future: all else being equal, I’ll select the one in a room other than Parc 55 Cyril Magnon I.

I’ve read quite a bit of positive buzz in the blogosphere about Play Framework and I can see from this presentation that it definitely has some attractive features and attributes.

This entry was posted in JavaOne 2012, Scala, Syndicated. Bookmark the permalink.

Comments are closed.