Going into James Ward’s talk on the PLAY framework I had no hands-on experience with the framework. I only knew of it from the odd mention in other developers’ Facebook updates.
- A light-weight web application framework with its own integrated web server (Netty).
- Stateless. This is a key principle of PLAY that helps encourage scalability.
- Encourages non-blocking asynchronous request handling to further enable scalability (e.g. it can handle more than one request per thread).
- Applications can be written in either Scala or Java.
- Nice MVC separation (Views, Models, Controllers).
- Uses Ebean and JPA for ORM.
- Integrated test framework.
The framework reminds me very much of Ruby on Rails, but the fact that it runs on a JVM makes me far more likely to try it.
I particularly like the light-weighted-ness of PLAY. It really embraces the HTTP protocol, not trying to hide it from the developer. This actually gives me more trust as a developer who would be just diving into a new system. Some of the heavier Java frameworks hide too much, resulting in extra time spent trying to figure out how to adjust the long levers of the framework to achieve something as simple as an HTTP redirect.
Ward made note that the stateless aspect of PLAY is important. He said that if you require state (as most applications do), you should relegate this to a store like memcached that can be scaled across multiple instances. This makes a lot of sense. I frequently reach the edge of what can be achieved on a single web server. If you depend too much on “state”, it makes it terribly difficult to introduce a 2nd server effectively. Moving to a “stateless” paradigm enables you to fully leverage the HTTP protocol, introducing caching and proxies effectively at many different positions in the request chain.