Pages

Friday 9 January 2015

Exploring Java Development using Play 2 Framework

Play 2 is a very interesting framework as both Java and Scala language can be used interchangeably in the same project for developing web application. Basically, it follows MVC pattern but breaks a couple of in grained java programming practices if one is well versed with Spring and J2EE development framework. For a more in dept analysis of this framework, I've decided to use it to implement a production grade SaaS application. Over the past one year, as new features were added and bugs fixed, the SaaS application was tinkered along the way to keep in line with each release of Play 2 framework. The current development environment is as follows:

  1. Source Code Repository: GIT at bitbucket.org
  2. Repository Manager: Artifactory 3.4.0
  3. JVM: Oracle JDK 1.7
  4. IDE: Eclipse Luna with Scala IDE plugin
  5. Database: Postgresql 9.3
  6. ORM: JPA 2.1 and Hibernate 4.3.6
  7. Security Framework: Social Secure master-snapshot
  8. Scala: 2.11.1
  9. Charting: DS3.js
  10. Template: Bootstrap 3
The features that have been implemented are:
  1. Internationalization
  2. AJAX invocation
  3. Bootstrap 3 based custom components
  4. Segregation of functions into modules
  5. Custom login page and authorization provider for Social Secure
  6. Front end javascript validation
  7. Date and numeric field formatting
  8. Optimized bulk insert and loading of data

The positives:
  • Building a working CRUD page is much faster than with JSF-Spring-JPA. Scala template is simpler than JSF. 
  • The performance is very good. The generated code is less cluttered when compared to JSF. Much easier to manipulate it through jQuery and unlike JSF do not have to synchronize the state with the server side managed bean.
  • Much easier to add customized components. Just drop the HTML code in a scala wrapper method.
  • No need to restart the server when adding the new code.
  • Auto-binding of the form data.
  • Akka 
The negatives:
  • Compilation can be slow. 105 scala sources and 87 java sources, take up to 2 minute to compile from a clean state. Much faster on subsequent compilation. Depending on the changes, some still trigger a lot of recompilation.
  • A lot of jar files are added via the transitive dependency. Currently stands at over 60 jars.
  • Scala IDE with Eclipse Luna is not working well. Occasionally some jar files could not be cleared until Eclipse is closed. Turning on "Build Automatically" can cause problem when compiling using the command line, activator compile.


16 comments:


  1. Hi I am Emi from Chennai. Thanks for sharing the informative post about Java technology. It’s really useful for me to know more about this technology. Recently I did Java Training Chennai at a leading Java Training Institutes in Chennai.

    ReplyDelete
  2. It's Really Great Post. Looking for some more stuff.
    SEO Training In BTM Layout

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete