J2EE has come a long way since its birth. It has evolve to a sub-par platform to an all globally renowned standard. Now, JEE6 the latest major specification for JEE platform has gone leaps and bounds to further enhance its capabilities as well as introduce more effective and efficient specs on the developers table, without compromising the standard capability that makes Java Web Applications durability stands on the tests of time.
Major Features of JEE6 – Though as a developer, what did change and how?
Right sizing: Profiles and Pruning
By introducing Profiles – technical architects / developers can control the APIs / Specs needed for the application. Java / JEE is a huge platform and imports a lot of apis to projects. Profiles is an introductory concept to limit the number of APIs needed for a specific application. For example: In a Web Application (Web Profile), you need support for JSP, EL, JSTL, JSF, EJBs (backend) etc. This wouldn’t be the same APIs and SPECs for J2ME right or J2SE apps right? You wouldn’t need JSP support if you’re developing a desktop application or EL if you’r developing a J2ME app. The mission behind profile is use only what is necessary to build the application to optimally create and develop the implementation. One good pre-defined profile is the Web Profile that uses EJB Lite – trimmed down version of Enterprise Java Beans.
Pruning – is another feature for right sizing, allows removal of existing APIs or Frameworks being used by the application. It provides a way to remove the following technologies from the platform.
- Java EE technologies that are outdated and have been replaced by new sets of technologies
- Technologies that are not well supported
- Technologies that are not widely deployed
Extensibility – Plug-ability
Need other frameworks for your application? JEE6 has this plug-ability feature that will help developers ease their process of plugging in multiple frameworks to be used in their applications. Not only its easy programmatically, doing so using Maven will ease it even more – by dependency management.
This mechanism provides a way to include additional technologies and frameworks that are not part of the standard platform. Extensibility points and Service Provider Interfaces (SPIs) help developers plug in these technologies to their platform implementations. Two new extensibility options are support for open-source enterprise application frameworks and scripting languages.
Ease of Development
Defaults over configuration – Profiles are set – why configure everything if there are pre-defined profiles that can be used? Idea: How about combining that with Maven Archetypes?
DI/CDI – Of course Spring is the master of Dependency Injection – but we’re in the open world, anyone can get the idea, create a new one an innovate it. Dependency Injection allows developers to class load POJOs using a one liner annotations. IoC scheme then uses these beans to inject them on any beans that are class loaded.
The specs has come a long way, but the very foundation is still there. The more the specs improves, the better Java Development / JEE Development experience will be. After all the purpose of this specification is to simplify the things and stuff that works.
In this blog post, I showed the basics and powerful new features of JEE6 – next post, I’ll focus more on Servlets 3.0 and how it compliments or add up to the new platform.