This is my Yet Another Attempt to Learn Something New 😀
From the discussions here, I got to know about the Play Framework. So I started to play around- Hello World project, started the Sample project, going through the Framework documentation. So here are my first thought about the framework- And this is my first attempt to have gone a bit deeper into a Java Web Framework so I might not be able to appreciate the same features in other frameworks.
- Totally inspired by Rails and of course Grails- Not much of configurations (expect the application configuration), based on convention over configuration.
- No restart of server required after compiling Java changes- Framework compiles them on the fly and hot deploy the compiled classes. For that matter Java developers would be surprised to see that there’s is not folder to store the class files in the Application structure. The class files are cached in a tmp folder. In one of the stalls in one of the conferences I had heard about JavaRebel plugin which would had hot reload, it really didn’t inspire me that much at that time.
- Pretty catchy error messages on the web page – With the line number and the exact errors being highlighted in the code snippet shown on the web page. This is possible due to the hot-reload when the framework can pick the error and throw it to the user via the web page.
- And it uses Java- So you need not have to learn any new language- For Rails you would require Ruby, for Grails- Groovy.
- For the Development mode- It comes with the complete stack- In memory DB , Application server, ORM layer and all other required plugins. Also one can install modules like- Facebook Connect, Facebook Social graph and so on.
- You can hardly/not at all find the mention of Servlets anywhere in the framework. Also it follows the REST style. So you can have cleaner URLS. And no web.xml to configure your URL-Servlet mapping.
- Good template for creating View pages- based on Groovy. Also provides an option to create an hierarchy of templates- Make one to extend the other template.
- Good support for Development with Testing. One can write JUnit tests for the back end, Selenium tests for the view related tests.
This is a really different framework when compared to the conventional Java web frameworks. I have just started to learn this framework. Do drop in your thoughts/concerns about this framework. 🙂
Removed the concerns- As they were not applicable and were really not counted as concerns. All those gimmicks was during the development time.
19 thoughts on “Play Framework- First thoughts”
It sounds that the only advantage of Play is on-fly compilation, which in fact is a technical detail of implementation.
I suggest the next something you try to learn may be HybridJava.
I like the Rails kind of implementation in Play.
Are there any commercial applications build using HybridJava?
Not that I am aware of. But. Learning something really new, developing new commercial project and passing an interview usually need knowledge that overlap only partially. In office I have to continue development (Java) that started 10 years ago and apparently will continue using current technology for 20 years more.
Play Framework has a lot to offer besides on-the-fly compilation, Kenalex. You should try it 🙂
Mohamed, AFAIK, Play doesn’t even rely on the Servlet spec at all.
Hot-deployment in a production enviroment isn’t really a concern, as you just.. well.. wouldn’t do it 🙂 Hot deployment is for devlopment, and I don’t even think this feature is available when you deploy your release of a Play application.
A VERY cool thing is that it also does not require a restart even when changing your JPA classes. That’s real developer productivity 🙂 They also have some very cool additions to JPA in their db-stack.
Thanks Edvin for the clarification.
Yeah I was aware that Play doesn’t rely on Servlet Spec.
“Play Framework has a lot to offer besides on-the-fly compilation”. Please name some others that are worth naming.
“Play doesn’t even rely on the Servlet spec at all.” In what sense? It does not use any servlet inside?
No it doesnt use Servlets.
Apparently you think that not using Servlet API inside Play is an advantage, Why?
Guillaume Borts, the creator of play framework, explains why they chose not to reply on the servlet api on this post:
in the homepage of the project you can see a brief overview of the nice things that comes with play
Thanks a lot for the link. Will read that 🙂
Thank you for the reference. I have read the explanation carefully. Still laughing …
//// What if my application has lots of Java classes- Say 500- A huge application? How is Play going to handle hot-reload in such cases? This will really increase the application response time? This would in a Production environment.///
Play hot reload only works on development mode… not in production servers.. 🙂
I forgot to correct the post before. Have updated and removed the 2 concerns. Thanks for reminding 🙂
We are looking for reviewers for our book, Play Framework Cookbook, recently released by Packt. You can visit this book-page for detailed information: http://www.packtpub.com/play-framework-cookbook/book
Based on this blog article, I am able to understand, through your interest in the Play! framework technology that you can be a potential reviewer for our book.
If interested, I’d be glad to send you an e-copy of the book for reviewing. You can contact me on my email: email@example.com
Thanks for the offer. Sent an email to the mentioned address.