In an endless search for efficiently building Web applications, one might stumble upon a new framework called Play! Using enterprise backed Java with a Rails-esque feel, the Play! framework seems to offer quite a bit over traditional web development tools with its straightforward development environment and ease of deploying.
Taken from the website:
The Play! framework makes it easier to build Web applications with Java. It’s a clean alternative to bloated Enterprise Java stacks.
First off, I have to say I am a fan of Rails for deploying web applications, and the Play! framework is just as easy. Once installed you can create a project
~$play new project
and then easily deploy (albeit boring and default) it:
~$play start project

No setup files and no need for Tomcat, simple and awesome. Of course, Rails developers won’t be too impressed, but it is a breathe of fresh air for those Java folks. As far as development goes, using the Play! framework is pretty straightforward. The project adheres to the MVC paradigm and forces you to as well. You place all of your Models in the app/models folder, all of your Controllers in the app/controllers folder and you place all of your Views (html files in this case) in the app/views folder. Keeping this setup and maintaining the MVC ideal gives you great power out of the box, and all without needing to program any glue to make these pieces work seamlessly together.
Of course there are other features that make the Play! framework appealing. For one, it does offer an “instant compile”, which really isn’t instant but allows you to view code changes as soon as your page is refreshed. Another feature is the increased support for debugging source code. Any compile errors will be displayed in your browser:

This is especially nice for those accustomed to JSP because your view will actually show you where the break occurs. This and other system messages are logged in the logs/ directory. Enticed yet? Along with all of this, the Play! framework has the ability to “eclipsify” your project so that it can be modified and tested using the Eclipse IDE. To do this you go to the parent directory of your project and simply run:
~$ play eclipsify project
Then you can import into Eclipse using the “Existing Project” import option. Netbeans is also supported with a similar one line command. With a fast deployment scheme, instant compiles, better debug feedback from JSP, and multiple IDE support the Play! framework truly makes it easier to build web applications with Java.
Check it out and let us know what you think!
Also keep an eye out for our upcoming guide to getting started with Play!


5. October 2009 at 11:25 am
[...] too long ago I posted an article on the Play! framework. The framework has some promising features that really helps develop web [...]