Play Framework- First thoughts

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. πŸ™‚

Update:

Removed the concerns- As they were not applicable and were really not counted as concerns. All those gimmicks was during the development time.

Advertisements

19 thoughts on “Play Framework- First thoughts

  1. Kenalex

    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.

    Like

    Reply
    1. Mohamed Sanaulla Post author

      I like the Rails kind of implementation in Play.

      Are there any commercial applications build using HybridJava?

      Like

      Reply
  2. Kenalex

    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.

    Like

    Reply
  3. Edvin Syse

    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.

    Like

    Reply
  4. Kenalex

    @Edvin
    1)
    “Play Framework has a lot to offer besides on-the-fly compilation”. Please name some others that are worth naming.

    2)
    “Play doesn’t even rely on the Servlet spec at all.” In what sense? It does not use any servlet inside?

    Like

    Reply
  5. Mohamed Sanaulla Post author


    Kenalex:
    @Edvin
    β€œ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.

    Like

    Reply
  6. Pingback: Was sagen andere zum Play Framework? | svenkubiak // play

  7. Muhammad Saqib

    //// 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.. πŸ™‚

    Like

    Reply
    1. Mohamed Sanaulla Post author

      I forgot to correct the post before. Have updated and removed the 2 concerns. Thanks for reminding πŸ™‚

      Like

      Reply
  8. Request for review of Play Framework Cookbook

    Hi Mohamed,

    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: jiteshg@packtpub.com

    Regards.

    Like

    Reply
  9. Pingback: Play Framework Cookbook- Using Play! in a better way- A preview | Experiences Unlimited

  10. Pingback: JavaPins

  11. Pingback: Was sagen andere zum Play Framework? | svenkubiak // developer blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s