Wednesday, December 13, 2006

Change in plan

I started BaseApp with the plan of using the J2EE 1.4 APIs (and frameworks built around it) but now that i have started reading the book Enterprise JavaBeans 3.0 (5th Edition) by Bill Burke and Richard Monson-Haefel, i feel its better i adopt the Java EE 5.0 APIs. Reason being that,
  1. EJB 3 spec uses standard Java EE annotations (for attribute oriented programming) and hence i wont be relying on xdoclet (and hence from now xdoclet does not have much of a role to play in green field projects of Java EE 5.0) and
  2. the Java Persistence API spec gives a standard programming model (POJO based) for ORM and hibernate 3.2 has become an implementation of this API. So though i can still use hibernate with JBoss 4.0.5 GA (which supports EJB 3.0 spec partially) as a JPA implementation i can have the option to change to TopLink too.
  3. an existing application using EJB 2.x beans upgrades the application server with support for EJB 3.0, then the developers could as well have the new beans written in EJB 3.0 which can co-exist with EJB 2.x beans. This backwards compatibility is required from the server vendors by the spec. Upon such an upgrade a project team may even decide to refactor the existing EJB 2.x bean classes incrementally to become EJB 3.0 POJOs. Such an upgrade especially will make more sense to organizations which use open source no cost app servers like JBoss AS. JBoss 5.0 Beta 1 is released recently (which implements EJB 3.0 spec completely) and i think companies which have used this AS for their product will have started their migration efforts already or will do so soon. Once the production ready version is available, i foresee that upgrade to JBoss 5.0 and other open source Java EE 5.0 app servers will be first to happen due to the obvious benefits of EJB 3.0 (easier to develop and deploy than earlier versions of EJB) and that such app server upgrade will not require the organizations to change their existing code. The organizations can first test their existing application thoroughly by simply deploying them on the new app server and later can add new beans which are EJB 3.0 and still later can plan for refactoring their existing code.
  4. EJB 3.0 container is really a micro container which can be embedded in say Tomcat (a servlet container) too. JBoss has hence changed it architecture from using JMX-based micro kernel to embeddable EJB 3.0 micro container with their support for EJB 3.0 in recent releases. This is something which Spring framework also did.
  5. Spring used to fill the gaps well for EJB 2.x era applications but with EJB 3.0 this gap is narrowed significantly, if not closed completely, in most areas of significance. So, i for one, who has no experience in Spring framework and had not learnt it so far on my own, feel that it will be better investment of time and effort to learn and master EJB 3.0 which is standard API set and not third-party (even though not as powerful and reliable yet as Spring).
In short, mastery of EJB 3.0 seems to be a better investment of time now and hence the decision to develop BaseApp as an EJB 3.0 application.

So this is the final list of tools and frameworks against which BaseApp will be developed for its first release:
  • Stateless/Stateful Session Beans
  • Message Driven Beans

No comments:

(c) 2006-2007, Watsh Rajneesh. All Rights Reserved.