O/R Mapper 的一些问题

0 views
Skip to first unread message

xunin...@gmail.com

unread,
Mar 3, 2005, 10:04:08 PM3/3/05
to DesignPa...@googlegroups.com
O/R Mapper 是什么?能为我们带来什么?

O/R Mapper 和Code Generator的区别是什么?

使用O/R Mapper 的动态SQL语言和使用Store Procedure的利弊.

O/R Mapper使用Attribute还是Mapping file?各自的利弊.

aop...@gmail.com

unread,
Mar 3, 2005, 10:53:40 PM3/3/05
to DesignPa...@googlegroups.com
Martin Fowler的<Patterns of Enterprise Application
Architecture>一书,对这个说的很好。同时介绍了几种模式,如Active Record,Row Data GateWay,
Table Data GateWay和Data Mapper。

如果业务逻辑很复杂,应使用Data Mapper。对于关系数据库和对象的映射,可以使用专业的工具,生成代码,剩下的工作,重点是分析映射后对象的行为。

至于动态SQL语言和存储过程的利弊,很多论坛和文章都有讨论了。各有利弊,很难说谁绝对的好,应根据项目的具体应用环境来判断。

Reply all
Reply to author
Forward
0 new messages