Play 2.1 introduces CDI and modularisation
TypeSafe have released
version 2.1 of the Play framework, introducing Dependency
Injection for Controllers and a modular approach for the
It follows the release of fellow Typesafe framework Akka 2.1 on December 26, which introduced cluster support for elastic cloud-based applications, giving a new gloss to the Typesafe Stack.
Each of Play’s seven new modules has “minimal dependencies”, allowing devs to pick and choose which parts they require and keep project sizes low. Play’s new route syntax allows use of dependency injections, achieved by prefixing the controller method in routes files with an "@" symbol.
The entire runtime API for Play has been migrated to Scala 2.10, allowing developers to use the newest Scala features in Play, including the scala.concurrent.Future library for managing asynchronous code. Since Play is now based on the library’s API, its HTTP and streaming features are is fully compatible with any other library using the API.
Play 2.0 was released in March of last year along with Akka 2.0, bringing with it native Java and Scala support among other improvements.
Parent company TypeSafe had a fantastic 2012, raising $14m in capital funding in August and wooing Spring Framework creator Rod Johnson. Now loaded with cash and talent, we should expect plenty more from Scala and Play over the coming year.