POJO的解释(最接近出处,目前所见最准确)

http://c2.com/cgi/wiki?PlainOldJavaObject

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

EditText of this page (last edited October 3, 2007)
FindPage by searching (or browse LikePages or take a VisualTour
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值