什么是POJO

POJO

http://webmouse.spaces.live.com/blog/cns!A5C368849AC2F574!394.entry
在做培训的时候经常被问到:到底什么是POJO。  摘录Martin Flower大师的一段定义吧,但愿能给个圆满的解答。
 
Plain Old Java Object. This acronym is similar to POTS — Plain Old Telephone Service.

“I've come to the conclusion that people forget about regular Java objects because they haven't got a fancy name - so while preparing for a talk Rebecca Parsons, Josh Mackenzie and I gave them one: POJO (Plain Old Java Object). A POJO domain model is easier to put together, quick to build, can run and test outside of an EJB container, and isn't dependent on EJB (maybe that's why EJB vendors don't encourage you to use them.)”
~ Martin Fowler

译文

POJO - 简单老Java对象 . 这个缩写看起来很像POTS - 简单老电话服务。

对于人们经常忘记常规的Java对象,我的总结是它们没有一个好名字 - 因此在准备一次演讲时,Rebecca Parsons, Josh Mackenzie 和我给起了名字: POJO。  一个POJO模型是易组合、快速建立并且运行于EJB容器之外的,不依赖于EJB的一类对象(这或许也是EJB提供商们不鼓励我们使用他们的原因)

 

你可能感兴趣的:(java)