Monday, June 27, 2011

I'm not dead yet

From time to time, I see posts asking whether or not Java EE is dead. To paraphrase with a Java EE twist, "The reports of my demise have been greatly exaggerated." It takes a lot of effort to build and deliver a Java EE release and it should be no surprise that it takes a while for vendors to get support out the door, but WebSphere Application Server V8.0 is now out and Java EE 6 support is one of the major pieces of it.

I've been prepping education material for various groups, but I thought I'd take a moment to reflect just how far we've come in improving the platform.

Once UI frameworks start taking advantage of Servlet 3.0 web fragments, it will be a snap to drop a UI framework into a web app and have it auto configured. JSF Facelets are a great improvement on UI composition and reuse. JSF Managed Beans have been split out into their own basic component model that will serve as the core for the platform's future evolution. This means a lean and mean component model that developers can easily grasp and use. The annotated POJO programming model is used everywhere and makes developing and describing components easy. Managed Beans and EJBs now form a graduated component programming model that starts simple and lets you add capabilities as needed with nothing more than an annotation. You can now package your EJBs in your WARs and Contexts and Dependency Injection for EE (CDI) will let you use them as Managed Beans. That means you can start with Managed Beans in your web app today and easily switch to EJBs as needed without repackaging or changing coding patterns. EJBs can be used anywhere a Manage Bean is used and just as easily.

Need to provide access to resources over the web? JAX-RS provides a simple POJO pattern for RESTful services.

Want to stop writing validation logic throughout your application to ensure data integrity? Try Bean Validation and have it done automatically for you.

Lastly, there's a new set of scoped JNDI namespaces that extend beyond java:comp into java:module, java:app, and java:global scopes. These allow a developer to share resources and refs at each of their respective scopes without having to replicate resource declarations in numerous places. It also makes it easier on admins, who only have to bind the shared resources once, instead of everywhere they are used.

I'd have to say that EE 5 and EE 6 have been some of the most productive releases from a developers point of view. This is about as far from being dead as a platform can get. If you haven't tried it yet, pick up a developer or trial edition of WebSphere Application Server v8.0 for free and give it a shot.


Jon Marshall said...

I agree. For me, people that claim that Java EE is dead often take many of the services that it provides for granted.
For example, as we look to WAS v8, many users will appreciate the backward compatibility that Java EE and WAS provides so they can move forward with no or little application change.

andypiper said...

I think the question is often not whether Java EE is dead, but whether Java itself is heading that way.

It's understandable as a question to ask in a world where scripting languages and web markup become more capable, data is "in the cloud", and languages such as Objective-C are forced on mobile developers by Apple.

It misses the point, of course. Now more than ever, the Java ecosystem is incredibly vital. Stephen O'Grady from RedMonk has been talking about this for the past few months. The language is in use across the Android platform, and has its own new variants like Groovy and Scala. And, critically - how do you get that data out of "the cloud" and to a mobile or web UI? Here's betting there is an EJB somewhere in the backend! :-)