PHP框架中的数据存储

实际上,我正在寻找一个帮助我使用“数据映射器”模式的框架.
我注意到很多PHP框架都提出了“Active Record”实现……

我发现“活动记录”对管理“功能数据”来说太差了……
使用此模式处理“复杂事务”或处理非DBMS后端似乎更简单…

有没有人知道处理“Data Mapper”模式的PHP框架?
或者是一个独立于DBMS处理“事务”的PHP框架?

解决方法:

Doctrine加上Zend Framework,这里是guide整合两者.

The following section tries to explain where Doctrine stands in the world of ORM tools. The Doctrine ORM is mainly built around the Active Record, Data Mapper and Meta Data Mapping patterns.

CakePHP将在2.x版本中提供数据映射器功能.

Roadmap / Major Features

  • Model Refactoring
  • Extending beyond the “almost” Active Record existing
  • Interpretation of the Data Mapper design pattern
  • Returning Objects from model interactions
  • ArrayAccess to allow backwards compatability

Symfony

The relational database information must be mapped to an object model. This can be done with an ORM tool and thankfully, symfony comes bundled with two of them: Propel and Doctrine.

Codeigniter Datamapper

DataMapper is an Object Relational
Mapper written in PHP for CodeIgniter.
It is designed to map your Database
tables into easy to work with objects,
fully aware of the relationships
between each other.

上一篇:c# – 实体框架 – objectcontext处置异常


下一篇:PHP函数param类型的最佳实践