对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)
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)
相关文章推荐
- 你对第三届学生会换届的候选人有何意见?
- 3DVP意见收集
- 大家有什么意见和建议往这里发吧
- 写了个组件 让大家给点意见(里面有N多BUG)
- 浅述业务趋势和应用技术走向(2003-5-30……曾经的建议意见)
- 对自己的工资有意见啦!
- [征询意见]博客园logo
- AJAX讲座内容提纲(意见征询)
- IBM职业之路—职业规划和技术发展(转自LU)听听前辈的意见-Part II
- [征询意见]博客园准备出两本书《博客园精华集》与《成长之路》
- 欢迎提出宝贵意见
- 国务院关于发展城市社区卫生服务的指导意见
- 非常欢迎您的莅临指导,并提供宝贵意见和建议
- 《博客服务自律公约》现征求意见中~
- 征求对“开源GIS研究”团队发展的建议和意见
- 一个简单的算法题目,搞了半天,希望大家能给点意见
- EasyARM2200硬件设计的几点改进意见zz
- 征集《软件设计精要与模式》精彩评论与意见
- 赴日外包 求 意见
- 想设计一个简单的RSS在线阅读程序,欢迎大伙提供意见