Is it feasible to write enterprise applications in Java once while still being able to run them ‘anywhere’?
Yes, no, maybe, it depends…
The idea of the Java software development platform is based on this WODRA concept. Developers build an application using a standardized set of platform independent API’s and once the Java code is compiled to byte code it is the Java runtime environment that will make sure it runs everywhere.
In real life, it turns out to be very difficult to move applications from one environment to another. In the past I have worked on some of the replatforming projects.
Usually it involves different versions of the Java Runtime Environment, different versions of Java EE, different vendors of the former. As well as applications that have been build to use the bespoke features of the platform of choice. Something that isn’t necessarily a bad choice, but will make the effort of replatforming somewhat more difficult.
I have decided to create a Java EE 6 reference application. The goal of the reference application is to demonstrate that it is possible to create truly portable applications. Even at an advanced enterprise application level. But also to illustrate which design principles to take into account and to share my experiences in lessons learned about what to do and not to do for portability of applications.
I am allready confident that building a Java EE reference application will mean more work than building a solution for a target platform. However, I do beleive that it will help to determine best practices and design guidelines as well as insight in the portability and replatformability of Java EE enterprise applications.
I will use the following environments:
- Windows, Linux CentOS, MacOS
- Java JRE 6, Java JRE 7
- Redhat JBOSS 7.1, IBM WebSphere Liberty 220.127.116.11, IBM Bluemix
- MySQL, Derby SQL databases (portability of JPA e.g.)
- MongoDB (with and without application server support)
- Java Security vs. OAUTH