博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
对CODEFISH的意见
阅读量:4224 次
发布时间:2019-05-26

本文共 994 字,大约阅读时间需要 3 分钟。

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)  

转载地址:http://gxgmi.baihongyu.com/

你可能感兴趣的文章
SSL与TLS的区别以及介绍
查看>>
HTTPS、TLS、SSL、HTTP区别和关系
查看>>
Kafka 入门三问
查看>>
c/c++ 内存泄漏检测,开源工具valgrind使用整理
查看>>
h264 sps pps详解
查看>>
AAC的ADTS头信息介绍
查看>>
Coroutine,你究竟干了什么?
查看>>
代码宏的一点小知识
查看>>
Sweet Snippet系列 之 随机选择
查看>>
名人•牛人•我们这些普通人
查看>>
小话游戏脚本(一)
查看>>
使用VS2010在项目中编写C++头文现出"PCH 警告:标头停止点不能位于宏或#if块中"
查看>>
统计源期刊
查看>>
多线程解码并保存为yuv
查看>>
使用信号量控制线程执行顺序,进而控制不同视频流的解码顺序
查看>>
解码单个视频及保存yuv数据到文件中
查看>>
为什么基类中的析构函数要声明为虚析构函数?
查看>>
对象切割 - 常量引用传递
查看>>
北邮同学面经
查看>>
Effective C++条款16:成对使用new和delete时要采取相同形式
查看>>