Blog

September 20, 2013

Announcing Play Framework 2.2.0 - The Reactive Web Framework

September 20, 2013
PlayFramework

Typesafe is proud to announce the release of Play Framework 2.2!  Play enables developers to quickly develop Reactive web apps with Java, Scala, JavaScript, and emerging technologies like CoffeeScript and LESS.  Check out the detailed Play 2.2 release highlights!

Here is an overview of some of the most exciting new features:

Improved Java promise API

Users of the Java API are now able to better handle errors, create their own promises, and specify an execution context for asynchronous actions to run in. This allows more scalable and robust application development in Java Play apps, giving developers complete control over thread management, especially when blocking operations will be done.

Unified Deployment Packaging

Play now uses the SBT native packager, which provides greater flexibility when staging and packaging distributions, and also provides a range of distribution options, including zip, RPM, deb, and dmg.  Play applications can now be packaged out of the box for specific native deployment scenarios, allowing greater ease of deployment and the ability to fit into existing environment requirements.

Improved Controller API

The HTTP Result object, which was a hierarchy of 3 classes in Java and 5 classes in Scala, has been simplified to be one class, SimpleResult.  Asynchronous results are now expressed as just being a promise or future of a SimpleResult.  This makes for a simple architecture, improving the ability to compose actions.  For example, previously to modify a result in a filter, you may have had to write Scala code like:

def modifyResult(result: Result): Result = {
 case plain: PlainResult => // code here to modify result
 case AsyncResult(wrapped) => AsyncResult(modifyResult(wrapped)
}
modifyResult(myResult)

Now this can be simplified to this:

myResult.map { result => // code here to modify result }

The Reactive Web Framework

These are just a few of the features in the 2.2 release of Play.  There have been 140 contributors from Typesafe and the community to make Play the best framework for writing Reactive apps. And now it couldn’t be easier to get started building new Play apps using Typesafe Activator.  So download Activator today and build Reactive apps!

comments powered by Disqus
Browse Recent Blog Posts