Overview
The Play! framework makes it easier to build Web applications with Java. It's a clean alternative to bloated Enterprise Java stacks. It focuses on developers productivity and targets RESTfull architectures.
Play! is a perfect companion to agile sofware development.
Pure Java framework
Play! is a pure Java framework and allows you to keep your preferred development tools and libraries. If you already use Java as a development platform you don't need to switch to another language, another IDE and other libraries.
Just switch for a more productive Java environment !
A Play! application looks like really coherent for any Java developer :
Built over HTTP
If you already use another Java Web framework like Servlet or Struts you are used to abstract the HTTP API with strange Java APIs and concepts. But we think that a Web application framework should give you a full access to HTTP and its concepts. This is the fundamental difference between Play! and the other Java web application frameworks.
HTTP, the Request/Response pattern, REST, content type negotiation and URI are central concepts for the Play! framework.
The Router binds an URI pattern to a Java call :
GET /clients/{id} Clients.show
If AJAX, REST and back/forward management are problematic concepts for your actual web application framework, for Play! it's organic.
Efficient templating engine
We like the idea behind JSP & Expression Language. But why so many configuration files to create a TagLib ? Why can't we have a full access to the object model ? JSP has a lot of limitations and is very frustrating. That's why we've created our custom template system, inspired from JSP but without any constraint !
If you're tired to write things like this :
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<c:choose>
<c:when test="${emails.unread != null && fn:size(emails.unread)}">
You've ${fn:size(emails.unread)} unread emails !
</c:when>
<c:otherwise>
You've none unread emails !
</c:otherwise>
</c:choose>
You will love to write :
You've ${email.unread?.size() ?: 'none'} unread emails !
The expression language used by the template engine is Groovy and offers a syntax really coherent with the Java one and even with the JSP one. While Play! uses mainly the templating system to display HTTP responses, you're free to use it to generate any document like emails.
Finally, be productive with Java !
The Java platform is sadly known for his low productivity, mainly because of repeated compilation, packaging, and deployment cycles.
The main goal of the Play! framework is to reach the maximal productivity within the Java platform. That's why we have optimized all the development cycle to make developing with Play! really transparent.
The framework compiles directly your Java sources and hot-reloads them into the JVM without the need to restart the server. You can then edit, reload and see your modifications, like in any LAMP environment.
When an error occurs, the framework makes his best to show you the buggy source code. No more cryptic errors and stack traces analysis to find a syntax error.
Full-stack application framework
The Play! framework was extracted from our real Java Web applications. It has all the needed tools to build any modern web application :
- Relational Database support through JDBC.
- Object-Relational Mapping using Hibernate.
- Memcache support.
- Web services consumption either in JSON or XML.
- OpenID support for distributed authentication.
- Image manipulation API.
- …
A plugin system lets you compose a Web application with many other Web applications, reusing their Java code, templates or public resources like Javascript and CSS.
Install the Play! framework and start developing your first application.


