Play Framework: Painless Web Development for Java and Scala
The Play framework is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Play is a perfect companion to agile software development.
Play framework 2.0 builds on Scala, Akka, and sbt to deliver superior asynchronous request handling, fast and reliable type-safe templates, and a powerful and flexible build and deployment system. Developers can use Play 2.0 to add a simple HTTP layer to existing projects; or can build full-featured web applications that take advantage of the integrated support for database persistence, form validation, testing, authentication, caching, and RESTful web services.
A Java and Scala web framework without the pain
Play is a pure Java and Scala framework and allows you to keep your preferred development tools and libraries. If you already use Java or Scala as a development platform you don’t need to switch to another language, another IDE or other libraries. Just switch to a more productive web framework!
Fix the bug and hit reload
The Play framework compiles your Java and Scala sources directly and hot-reloads them into the JVM without the need to restart the server. You can then edit, reload and see your modifications immediately, just as in a LAMP or Rails environment.
Simple stateless MVC architecture
You’ve got a database on one side and a web browser on the other. Why should you have a state in between?
Stateful and component based Web frameworks make it easy to automatically save page state, but that brings a lot of other problems: what happens if the user opens a second window? What if the user hits the browser back button?
Play framework uses the same shared-nothing architecture as PHP, Ruby on Rails or Django. As the browser becomes more and more powerful, it is now easy to use Ajax or offline storage to solve the state problems client-side, while at the same time making it easier to render portions of the page in parallel, and to do partial page updates (or progressive enhancements).
Efficient, type-safe templating engine
Starting with Play 2.0, a Scala-based template engine is the default for Play applications - even for developers using Java as the main programming language. This doesn't mean that you have to become a Scala expert to write templates in Play 2.0. However if you want to unleash the power of Scala to write advanced templates abstractions, you will quickly discover how Scala, being expression-oriented and functional, is a perfect fit for a template engine.
And that's not only true for the template engine: the routing system is also fully type-checked. Play 2.0 will check all your routes' descriptions, and verify that the everything is coherent, including the reverse routing part.
As a nice side effect, being fully compiled, the templates and route files are easy to package and reuse and you can expect high performance from these parts at runtime.
Full-stack application framework
The Play framework has all the tools needed to create a modern web application, including:
- relational database support and object-relational mapping
- integrated cache support
- straightforward RESTful web services
- OpenID support for distributed authentication
- flexible deployment options (application server, Heroku, cloud platforms, etc…)
- an image manipulation API
The modular architecture lets you combine a web application with many others. Thanks to application modules, you can reuse your Java and Scala code, templates and static resources (such as JavaScript and CSS files) in a simple way.
Play framework 2.0 is open source and available under the Apache 2.0 License. It is available as part of the open source Typesafe Stack.
Play was originally created by Typesafe advisory board member Guillaume Bort. You can learn more about Play at the Play community project site.


