您的位置:首页 > 其它

对CODEFISH的意见

2006-08-20 22:43 162 查看
Will 说:
Nice code.

Well, I have 2 comments.

1) You can remove the forward function calls in UserInfo, so as to make UserInfo decoupled from the o/r mapping utilites, for more compact code and less coupling

2) It is better to let UserUtilities to return a collection of UserInfo (e..g IList<UserInfo>) other than DataSet, so that the client code is less coupled with ADO.NET techonology
Will 说:
The pattern you used in UserInfo is called "Active Domain Object". In my personal opinion, I prefer not to use this pattern and keep the domain objects pure
Casper Liu 说:
o, thanks very much... I will think about your suggestion and have a discuss
Will 说:
The philisophy is that Domain Objects should only have the knownledge on how to manage its internal state information, but not to have the knownledge on how to persist itself - this kind of knowledge tends to change with time, and should be owned by some "professinoal" externals else(O/R mapper and its related configuration info, for example)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: