16->The Data Mapper Pattern(etng预定)
时间:2006-03-27
来源:互联网
16
The Data Mapper
Pattern
The two previous chapters―The Active Record Pattern and The Table Data Gateway Pattern―
showed strategies that abstract a table row and an individual table, respectively. While both
patterns are useful, each pattern’s implementation is closely coupled with the structure of the
underlying database, so solutions based on those patterns tend to be brittle. For instance, if your code
uses field names as keys in row arrays or attributes in row data objects, you’re application is tied to the
structure of the database and you may have to make extensive changes in PHP for every (relatively)
minor change in a table.
Because code and databases often change during development and evolve after they’re deployed,
there are real benefits to separating domain code and its database(s) as much as possible, insulating
each other from interdependencies and reducing the work required to realize a change in either.
The Problem
How can you minimize the coupling between your application’s classes and its database? For example,
The Data Mapper
Pattern
The two previous chapters―The Active Record Pattern and The Table Data Gateway Pattern―
showed strategies that abstract a table row and an individual table, respectively. While both
patterns are useful, each pattern’s implementation is closely coupled with the structure of the
underlying database, so solutions based on those patterns tend to be brittle. For instance, if your code
uses field names as keys in row arrays or attributes in row data objects, you’re application is tied to the
structure of the database and you may have to make extensive changes in PHP for every (relatively)
minor change in a table.
Because code and databases often change during development and evolve after they’re deployed,
there are real benefits to separating domain code and its database(s) as much as possible, insulating
each other from interdependencies and reducing the work required to realize a change in either.
The Problem
How can you minimize the coupling between your application’s classes and its database? For example,
作者: PHPChina 发布时间: 2006-03-26
...
作者: Bantu 发布时间: 2006-03-28
我要翻译这章!!
联系方式:
QQ 19771708
注册帐号:zlloveliuxin
地址:陕西省陕西科技大学研0509班
邮编:712021
收件人:张亮
电话:13109611112 (只接短信)
尺码:an random
颜色:at random
件数: 1
希望可以分配给我1章内容进行翻译工作.
翻译历史: 曾经帮助我的导师陕西科技大学计算机学院院长)翻译过有关XML理论的2篇论文,投稿于IEEE专刊.
英语6级水平
专业:计算机学院
特长:写作与翻译
学历:硕士
联系方式:
QQ 19771708
注册帐号:zlloveliuxin
地址:陕西省陕西科技大学研0509班
邮编:712021
收件人:张亮
电话:13109611112 (只接短信)
尺码:an random
颜色:at random
件数: 1
希望可以分配给我1章内容进行翻译工作.
翻译历史: 曾经帮助我的导师陕西科技大学计算机学院院长)翻译过有关XML理论的2篇论文,投稿于IEEE专刊.
英语6级水平
专业:计算机学院
特长:写作与翻译
学历:硕士
作者: zlloveliuxin 发布时间: 2006-03-29
zlloveliuxin最近因为考试非常忙,所以改由etng翻译此章节。
作者: PHPChina 发布时间: 2006-04-24
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28