Friday, February 25, 2011

Playing with the Play Framework

Back to blog after very long time. This post is basically about the new exciting Java web framework Play and a small implementation of app using it: pptViewer a simple PPT file viewer.

After successfully implementing (basically porting) a small application in Play I can say that every Java programmer who wants to taste agile development must use this framework at least once. Its really simple and lighting fast to build (small to medium size) applications. I have selected this framework for few of my upcoming prototype developments.

The demo application is very trivial one. It accepts a Microsoft PPT file and shows the slide contents on pages.  Apache POI is used to extract PPT file content and stored in MySql database. The original application is intended to manage multiple format Office files over web and is currently under development using Spring MVC. I choose to rebuild a small part of it using Play to evaluate it for slightly bigger and complex application and it worked really well. The framework documentation is very clear and concise for the beginners to quickly learn and implement stuff. The Play Community is growing day by day and illustrates a lot of new features\implementations of the framework.

Play provides most of the features required by any standard web applications (just like RoR, Django and Grails - actually the search is not over yet)). Standard (Static) MVC model, no upfront compilation (a great boon), front-end scripting and full Java stack are few of them. Play infrastructure can be extended with Modules (plugins) and many useful modules are already available. Play can fit nicely between regular Java web framework like Spring MVC and very dynamic framework like Grails. In the end Play has many similarities to Rails and one can say that like many other modern web frameworks (Grails, Roo) Play Team is also quite inspired from RoR.

After "playing" with GWT, Vaadin, Roo and Grails for a while and with my ongoing implementation I think Play is a very good framework in one's framework wardrobe.

A very good discussion of Play and RoR can be found on this Stackoverflow link.

Although my journey with Play is quite short till now but I quite impressed at the moment (if it doesn't work then something new will come, it has always come and I will start using that :) ).

Keep "play"ing.

(Special credit to Linode which enabled me to host the application from setup to deployment in just couple of  hours. I found Linode setup rather easy enough than to convert the application to GAE compatible.)

2 comments:

  1. nice post!

    is there any possibility you build a pptViewer module and share it?

    ReplyDelete
  2. Hi, unfortunately the module is now part of a freelance project I have been working on.

    If you need any specific help please send me a mail on my account dhaval [dot] b [dot] nagar [at] gmail [dot] com

    regards,
    dhaval

    ReplyDelete