原创  对CODEFISH的意见 收藏

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)  

发表于 @ 2006年08月20日 22:43:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:好久不做ACM 做起来手生的很。。 | 新一篇:哪位用CSDNBLOG的朋友帮我解决个问题

  • 发表评论
  • 评论内容:
  •  
Copyright © TJUsecretfish
Powered by CSDN Blog