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