POJO is an acronym for "Plain Old Java Object", which is generally used as a contrast with EJBs (i.e. "Enterprise Java Beans"). In principle, the advantage of POJOs is that they require less overhead and expertise of the authors. It was coined by Martin Fowler, Rebecca Parsons, and Josh MacKenzie to make them sound more exciting compared to EJBs.

The benefit is that there is less overhead with development. The code is more portable, more loosely coupled from specifics of the framework.

Non-invasive/Light-weight Frameworks

These are frameworks to add in object persistance and/or mapping to a relational database. Non-invasive frameworks operate without implementing interfaces or calling persistance APIs. They are often configured using metadata: XML and Java 5 annotations. Examples include:

Aspect Oriented Programming (AOP)

Aspect Oriented Programming is a way of adding templates to a programming language. It adds a layer of complexity, and allows you to intercept any number of methods which match a certain pattern. For example, if you want to add code to log and track all calls to 20 methods -- you could add calls to each of those 20 methods, or you could add an aspect which intercepts each of those method calls and runs the specified code.

There are three ways to add aspects to Java.

XML-based configuration
Does not require Java 5, but is less flexible.
This requires Java 5, and allows you to define aspects within the code itself using AspectJ annotations.
This is its own programming language with different keywords and its own compiler. It uses "bytecode weaving", which has an enormous variety of options.


John H. Kim <jhkim-at-darkshire-dot-net>
Last modified: Mon Mar 19 16:56:03 2007