http://c2.com/cgi/wiki?PlainOldJavaObject
EditText of this page (last edited October 3, 2007)
FindPage by searching (or browse LikePages or take a VisualTour)
Plain Old Java Object
POJO = "Plain Old Java Object". Term coined by
MartinFowler, RebeccaParsons
?, and
JoshMacKenzie to denote
a normal Java object that is not a
JavaBean
, an
EntityBean
, a
SessionBean
, etc., and does not serve any other special role or implement any special interfaces of any of the Java frameworks (EJB, JDBC, DAO, JDO, etc...). Any Java object can run within an EJB container, but many people don't know that or forget it. Fowler et al invented the acronym
POJO so that such objects would have a "fancy name", thereby convincing people that they were worthy of use. POJOs are useful for creating a
DomainModel. In contrast, the various types of beans and other special Java objects often have constraints that make it difficult to use them directly to model a domain.
I see a tendency of people fudging that definition of POJO because their ObjectRelationalMapping products obviously do not support POJO persistence, as they would like to announce. The typical case is referring to the JSR-220 (EJB3, JDO2) as "POJO persistence", when the EJB 3.0 early draft makes it clear that it is only a "Simplification of the enterprise bean types. Enterprise beans are simplified to more closely resemble plain Java objects ("POJOs") or JavaBeans." -- KlausWuestefeld
For real POJO persistancy have a look at PersistedObjectTree unlike KlausWuestefeld's Prevayler it lets you use any type of data structure. -- Bjorn Blomqvist
I see a tendency of people fudging that definition of POJO because their ObjectRelationalMapping products obviously do not support POJO persistence, as they would like to announce. The typical case is referring to the JSR-220 (EJB3, JDO2) as "POJO persistence", when the EJB 3.0 early draft makes it clear that it is only a "Simplification of the enterprise bean types. Enterprise beans are simplified to more closely resemble plain Java objects ("POJOs") or JavaBeans." -- KlausWuestefeld
For real POJO persistancy have a look at PersistedObjectTree unlike KlausWuestefeld's Prevayler it lets you use any type of data structure. -- Bjorn Blomqvist
EditText of this page (last edited October 3, 2007)
FindPage by searching (or browse LikePages or take a VisualTour)