Tuesday, December 4, 2007

Exploring JEE

I love the Spring Framework, and really have no strong case to move out of it. But of course, that doesn't hamper us from exploring what's beyond this space.

Spring was created to address the complexity of doing J2EE. It presented an easier more lightweight alternative. Spring gave power to the POJO, giving relief to container-bound, tightly-glued-together layers of the supposed standard. That was then of course..

Now comes Java EE5. Learning from the mistakes of the past (and success of competing technologies), this latest incarnation of the Enterprise version of Java features is aimed more at developer productivity. More modular and loosely-coupled. No more unnecessary three-object-cum-proxy-pattern-poster-boy persistence layer. An integrated yet pluggable web layer. Strategic use of annotations and component model. And a strong framework for web services. Here's a good overview/tutorial:

http://www.ibm.com/developerworks/java/library/j-jee5/

Most Spring-based applications are deployed on web containers only. Some may argue that the demarcation between a web container and a full JEE-server is starting to get blurry. Because of the modular nature of Spring-based apps, some services such as persistence and transaction becomes pluggable objects that the web container need not know about. Of course, the biggest turn-off again for using full blown J2EE is the very complicated persistence standard it uses. Things are different now of course. Your familiar Struts/Spring-MVC/Tapestry+Hibernate/JDO+Axis/Xfire could be translated to JEE. Would probably look like this: JSF+EJB3+JAX-WS, and still could be pluggable, implementation-wise, though not as flexible as the former.

Now the question is, would the now modularized and more configurable JEE stack be better suited for a more integrated experience compared to web container + addons?

Also, JEE can still make use of a framework on top of it that would make things more productive to the developers. Enter JBoss Seam:

http://www.jboss.com/products/seam

At first glance, looks very promising, and makes use of technologies that are very familiar. I just don't know though how tightly-knitted this framework is with JBoss AS as opposed to being used on other JEE application servers.

Again, I really don't know how much business value there is in migrating to a full JEE implementation. Still pretty comfortable, to reiterate, with our current stack. But again, this is just an exploration as to give us more options and a better understanding of technologies emerging beyond our backyard so to speak.

4 comments:

Paolo said...

naks blogger

himanshu said...

I agree with you. At one point of my career I decided to go for Spring but EJB3 and JPA cleared the clouds.

Steve Lewis said...

JEE definitely looks interesting. I'm considering it and it seems to have most everything we'd need. We currently don't use Spring (although we use DI in our Java code).

I thought I might need to pick up Spring, but JEE5 looks like it takes out the major ugliness of the prior version, so we may not need Spring at all.

Still looking into it.

Anshu said...

Not so fast. Spring 2.x has got better AOP support. I would probably go for JEE6, which I expect with Rod Johnson's involvement will be getting all the Spring's great features to it's fullest. Till then, I am happy with Spring (and the friends + Hibernate) .