本文介绍了最好的PHP DAL(数据抽象层)到目前为止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 什么是最好的PHP DAL(数据抽象层)到目前为止开发的任何开源项目,我们可以真诚地重用? What is the best PHP DAL (data abstraction layer) so far developed under any open source project which we could re-use with good faith? 我发现很难为我的应用程序选择一个DAL来充分支持大多数常见数据库系统(MySQL,PostgreSQL,MSSQL,Oracle等)的抽象,它是: I am finding it hard to choose a DAL for my application that sufficiently supports abstraction to most common databases systems (MySQL, PostgreSQL, MSSQL, Oracle, etc) and is: 广泛测试, 具有良好的界面(可读的方法名称,良好的参数传递策略) 快速, 轻量级, 提供缓存(例如集成Memcache或支持良好的缓存机制), 开放源代码许可证 应至少具有MySQL / MySQLi适配器(非基于PDO) widely tested, has good interface (readable method names, good parameter passing strategy),fast,lightweight, providing cache (e.g integrates with Memcache or supports a good caching mechanism),open-source license, should have adapters for at least MySQL/MySQLi (non-PDO based)要考虑的一些浴室: PHPBB DAL http://wiki.phpbb.com/Database_AbstractionLayer Joomla DAL http://api.joomla.org/Joomla-Framework/Database/JDatabase.html ADOdb http://phplens.com/adodb/ 教义(下限只支持PDO _ *) 任何开源项目/分支 PHPBB DAL http://wiki.phpbb.com/Database_Abstraction_LayerJoomla DAL http://api.joomla.org/Joomla-Framework/Database/JDatabase.htmlADOdb http://phplens.com/adodb/Zend_db Doctrine (downside only supports PDO_*)any other DAL used/developed under any open-source project/branch请不要考虑: PDO 所有ORM(但是,Doctrine似乎除了ORM之外还有一个单独的DAL) 推荐答案如果你能用PHP 5.3,我强烈推荐 Doctrine DAL ,它建立在PDO之上,所以你获得相同的性能和一个伟大的API。If you can do with PHP 5.3, I would highly recommend Doctrine DAL, it's built on top of PDO, so you get the same performance plus a great API. strong>更新:如果Doctrine不好,您可以尝试 MDB2 。它有大多数流行的RDBMS驱动程序,一个健壮的API,伟大的文档和庞大的用户基础:Update: If Doctrine is not good, you can try MDB2. It has drivers for most of the popular RDBMS, a robust API, great docs and a huge user base: MySQL MySQLi(仅限PHP5) PostgreSQL Oracle Frontbase Interbase / Firebird(仅限PHP5) MSSQL SQLite MySQLMySQLi (PHP5 only)PostgreSQLOracleFrontbaseInterbase/Firebird (PHP5 only)MSSQLSQLite 这篇关于最好的PHP DAL(数据抽象层)到目前为止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-11 17:38