August 20, 2007

Success of lightweight JAVA

The Spring Framework and Hibernate revolutionized the concept of POJOs with the introduction of lightweight technology. Then came EJB 3.0 spec which was inspired from the Spring guys. Meanwhile, Hibernate won the hearts of millions of people for its excellent ORM support. Latest to the party is JBoss Seam 2.0.

Why?
The lightweight frameworks promote better and cleaner application architectures, and make it easier to reuse business components. The rise of lightweight technologies was largely due to developers' rebellion against the heavyweight of EJB 2.1 (and earlier).

The Central Theme?
The core principle shared by all lightweight enterprise Java frameworks is the use of plain old Java objects (POJOs) for the data access and business logic. There are no more infrastructure classes or interfaces to inherit or implement. You just create a POJO to model your data or to implement a business process using the data. Then the POJOs are "wired" together using metadata.

How it works?
A key technique in the wiring of POJOs is a design pattern called Dependency Injection (DI). DI uses the lightweight framework container (Eg. Spring container or an EJB 3.0 container) to inject services or other objects into a POJO. This way, all object instances are created and managed by the container. A POJO need not manage the life cycle of its service objects or to look up services.

The Distinguishing factor?
The major differences between lightweight frameworks are how they wire container services together and implement Dependency Injection.

Ref: Java Developer's Journal

1 Comment:

Renie Ravin said...

Hi, please add your blog to our new directory of Indian Blogs and pick up an Indiblogger badge, thanks!

http://www.indiblogger.in