代码改变世界

POJO

2012-02-08 11:11  康杜  阅读(183)  评论(0编辑  收藏  举报

无意间看到Spring Source中各名家Rod Johnson, Eric Evens的留言

http://forum.springsource.org/showthread.php?18155-Session-Facade-Business-Facade

下次有人要跟我辩论说模型只能有getter/setter时,我就拿Rod的原话说“POJOs, like all objects, are the correct place for business logic. A pure JavaBean is a struct, not a real object. I would view structs as being true pollution of your object model"