<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" version="2.0"><channel><atom:link href="http://feed.feedsky.com/qeeify" type="application/rss+xml" ref="self"></atom:link><fs:self_link href="http://feed.feedsky.com/qeeify" type="application/rss+xml"></fs:self_link><lastBuildDate>Thu, 15 May 2008 20:10:34 GMT</lastBuildDate><title>Follow QeePHP, I can fly !</title><description>QeePHP 专题网站</description><link>http://qeeify.com</link><atom:link href="http://qeeify.com/index.php/feed" rel="self" type="application/rss+xml"></atom:link><language>en</language><pubDate>Sat, 21 Jun 2008 12:40:31 GMT</pubDate><dc:date>2008-06-21T12:40:31Z</dc:date><dc:language>en</dc:language><item><title>QeePHP 应用执行流程图</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142107/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/05/16/qeephp-application-flowchart.html/feed</wfw:commentRss><description>这个流程图描述了 QeePHP 应用程序的执行流程&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=9d5eb7786ed29fdf9c25d1b87f586dcf&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=9d5eb7786ed29fdf9c25d1b87f586dcf&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=b9aa346a2523a6ca1ed393647f5a3313&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=b9aa346a2523a6ca1ed393647f5a3313&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=53d038b813722cba099f271325e2f506&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=53d038b813722cba099f271325e2f506&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=817e8ac01ddbfdddf4da399521dbb213&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=817e8ac01ddbfdddf4da399521dbb213&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=1a3a844a00f156866b1a2dfc1b3885e1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=1a3a844a00f156866b1a2dfc1b3885e1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=6d84db4e5e6003b461979dd138b0a8f6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=6d84db4e5e6003b461979dd138b0a8f6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>QeePHP</category><category>Cookbook</category><pubDate>Fri, 16 May 2008 04:10:34 +0800</pubDate><author>dualface</author><comments>http://qeeify.com/index.php/2008/05/16/qeephp-application-flowchart.html#comments</comments><guid isPermaLink="false">http://qeeify.com/?p=107</guid><dc:creator>dualface</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/05/16/qeephp-application-flowchart.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142107/5106957</fs:itemid></item><item><title>QeePHP 数据库架构对象关系图</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142108/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/04/29/qeephp-database-bigtable.html/feed</wfw:commentRss><description>图片有点大，点击弹出新窗口观看。&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=b52618e443fd05f19142cdfc78d473d1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=b52618e443fd05f19142cdfc78d473d1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=e13598b3c4aa64cd943390d2a7a757db&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=e13598b3c4aa64cd943390d2a7a757db&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=e049087de54019cd70c30acc8d6b1cd7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=e049087de54019cd70c30acc8d6b1cd7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=ea406bd3ca35ee98de83b589f02668a8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=ea406bd3ca35ee98de83b589f02668a8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=293cec88e83d36d4fcfc948267e9fcbd&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=293cec88e83d36d4fcfc948267e9fcbd&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=fa8ec0e8921017c89dbc9593bb1c7238&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=fa8ec0e8921017c89dbc9593bb1c7238&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>database</category><category>QeePHP</category><category>Cookbook</category><category>architecture</category><pubDate>Tue, 29 Apr 2008 03:18:30 +0800</pubDate><author>dualface</author><comments>http://qeeify.com/index.php/2008/04/29/qeephp-database-bigtable.html#comments</comments><guid isPermaLink="false">http://qeeify.com/?p=98</guid><dc:creator>dualface</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/04/29/qeephp-database-bigtable.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142108/5106957</fs:itemid></item><item><title>Eclipse 启动后功能不正常怎么办</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142109/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/04/26/fix-eclipse-error.html/feed</wfw:commentRss><description>Zend Studio for Eclipse 是个很全面的 PHP IDE。但是也继承了 Eclipse 小问题不断的传统。

偶尔启动 Eclipse 会提示你某某功能无法使用，这时不需要重装，只要采用下面两个步骤即可解决：
1、找到 Eclipse 的安装目录，打开其中的 configuration 目录。把除“.settings”目录以外的子目录都删除掉；
2、在命令行窗口中输入 ZendStudio.exe -clean 来启动 Eclipse。
这样启动一次，Eclipse 会重新扫描插件，并生成缓存文件。所以关掉 Eclipse 再打开就是正常的了。&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=83e9cba05db9a591602d19b7e1010765&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=83e9cba05db9a591602d19b7e1010765&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=dedad40f56bbe11154d326090a3cd4a5&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=dedad40f56bbe11154d326090a3cd4a5&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=8946d789c4318be242a97056948ed327&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=8946d789c4318be242a97056948ed327&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=3a8b4f5f251706f03ddfaf88d321a6b7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=3a8b4f5f251706f03ddfaf88d321a6b7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=1ec1dbc1269e4e4381032c27e7386bbe&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=1ec1dbc1269e4e4381032c27e7386bbe&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=8dd787ca751c0f27f218ff69be674674&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=8dd787ca751c0f27f218ff69be674674&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>ide</category><category>Cookbook</category><pubDate>Sat, 26 Apr 2008 21:20:59 +0800</pubDate><author>dualface</author><comments>http://qeeify.com/index.php/2008/04/26/fix-eclipse-error.html#comments</comments><guid isPermaLink="false">http://qeeify.com/?p=97</guid><dc:creator>dualface</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/04/26/fix-eclipse-error.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142109/5106957</fs:itemid></item><item><title>图解集成 Google Code 到 Eclipse Mylyn</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142110/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/04/24/google-code-integration-with-mylyn.html/feed</wfw:commentRss><description>Eclipse Mylyn 是一个很不错的任务管理系统。如果能够把 Google Code 集成到 Mylyn，我们就可以在 Eclipse 中方便的查看和管理 Bug 列表了。本文图文并茂，保教包会 :)

安装 Mylyn
启动 Eclipse 后，选择菜单“Help -&gt; Software Updates -&gt; Find and Install”，在出来的对象框中选择“Search for new features to install”，然后点击“Next”。

从“Sites to include in search”列表中选择“Europa Discovery Site”，再点击“Next”。

经过漫长的等待。。。。。就会出现一大堆选项了。这些都是可以安装的组件，不过强烈建议不要什么都装上。不但会让 Eclipse 变慢，还会变烂（最后只能重新安装干净的 Eclipse）。
这里选择下列几个组件：

Mylyn Task List
Mylyn Focused UI
Mylyn Bridge: Eclipse IDE


选好后，点击“Next”开始下载。下载完成后会出现安装提示，选择“Install All”即可。安装完了一定要重启 Eclipse。
现在 Mylyn 装好了，但是还没法连接 Google Code，所以还得再次选择菜单“Help -&gt; Software Updates -&gt; Find and [...]&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=6167bfa25d6bf1d1173e529f9e6693ac&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=6167bfa25d6bf1d1173e529f9e6693ac&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=4eb906e8413e7f1e343e37e66d5c34c9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=4eb906e8413e7f1e343e37e66d5c34c9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=b560c064336790c152af24d6b43a378b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=b560c064336790c152af24d6b43a378b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=6f603ab881cc547b343dfab41b70027f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=6f603ab881cc547b343dfab41b70027f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=95f53a1f8ac8a05edac420d7f5831620&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=95f53a1f8ac8a05edac420d7f5831620&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=c8665ae3ae93c8f2db63664619f8facb&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=c8665ae3ae93c8f2db63664619f8facb&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>query</category><category>view</category><category>Tutorials</category><category>debug</category><pubDate>Thu, 24 Apr 2008 11:33:36 +0800</pubDate><author>dualface</author><comments>http://qeeify.com/index.php/2008/04/24/google-code-integration-with-mylyn.html#comments</comments><guid isPermaLink="false">http://qeeify.com/index.php/2008/04/24/%e5%9b%be%e8%a7%a3%e9%9b%86%e6%88%90-google-code-%e5%88%b0-eclipse-mylyn.html</guid><dc:creator>dualface</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/04/24/google-code-integration-with-mylyn.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142110/5106957</fs:itemid></item><item><title>使用python + crontab 实现 MySQL 数据库自动备份</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142111/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/04/20/use-python-to-backup-db-automated.html/feed</wfw:commentRss><description>这是一篇我很早以前玩python时写的东西，很粗陋，让大家见笑了。python很面向对象，很优美，希望大家会喜欢。
（貌似和QeePHP无关，哈哈。）&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=01423a2062425d4d06afd30cbbc2168d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=01423a2062425d4d06afd30cbbc2168d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=cee9f5ef218b12cfc94f78359211515e&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=cee9f5ef218b12cfc94f78359211515e&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=2f6a1869979daaece855e4c1cf9c3a45&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=2f6a1869979daaece855e4c1cf9c3a45&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=b75d1e37ce2caba7bc75e3fd42214508&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=b75d1e37ce2caba7bc75e3fd42214508&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=d3cfd9e31be4fab438c88fa4dac1fec6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=d3cfd9e31be4fab438c88fa4dac1fec6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=ab4287f12457b9da250f87d760b197a9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=ab4287f12457b9da250f87d760b197a9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>mysqldump</category><category>python</category><category>crontab</category><category>Cookbook</category><pubDate>Sun, 20 Apr 2008 22:18:15 +0800</pubDate><author>@</author><comments>http://qeeify.com/index.php/2008/04/20/use-python-to-backup-db-automated.html#comments</comments><guid isPermaLink="false">http://qeeify.com/index.php/2008/04/20/use-python-to-backup-db-automated.html</guid><dc:creator>@</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/04/20/use-python-to-backup-db-automated.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142111/5106957</fs:itemid></item><item><title>QeePHP 数据库架构（1）</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142112/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/04/12/qeephp-architecture-01.html/feed</wfw:commentRss><description>这篇系列文章是《QeePHP架构与实现》一书的部分章节摘录。

《QeePHP架构与实现》一书将是QeePHP配套书籍中的第二本，第一本是《QeePHP实战》。
《QeePHP实战》偏重入门和实践应用，而《QeePHP架构与实现》则是详细阐述QeePHP开发框架的设计思想、具体实现机制等等。
目前两本书都在紧张撰写中，这里先放出《QeePHP架构与实现》初稿的部分章节。补充一下，两本都是免费发放的电子书，类似 InfoQ 发布的迷你电子书。

QeePHP的数据库架构为QeePHP应用程序提供了全方位的数据库服务。
整个数据库架构的概貌如下图：

主要组件概述
QeePHP数据库架构包含的主要组件分为三个级别。
最底层的是适配器、事务等组件，提供直接操作数据库的能力，并且为更上层的组件提供服务；位于中间层次的则是表数据入口。表数据入口封装了对数据表的操作，既可以处理单独的记录，也可以高效得完成批量数据处理；最高层的ActiveRecord实际上应该算作领域层组件。但由于ActiveRecord和数据库操作紧密相关，所以还是把ActiveRecord放到数据库架构中来介绍。
从上图可以看出，ActiveRecord依赖表数据入口提供的数据库操作功能，而表数据入口由借助更底层的组件来操作数据库。这种分层可以让开发者根据不同的需求选择合适的组件来解决问题，而不是用一个all in one的怪物来试图应付所有需求。

适配器
    适配器是最底层的对象，用于为不同的数据库提供一个统一的接口。适配器好封装了结果集，以便上层组件能够利用统一的接口对查询结果集进行遍历。
事务
    QeePHP提供异常安全的事务管理机制。当启用一个事务后，该事务对象会处理未被应用程序捕获的异常，从而在异常发生时自动回滚事务。
表达式
    表达式用于封装一个数据库表达式，以便在查询对象以及其他数据库操作中使用。
表关联
    表关联封装了数据表之间的关联关系。表数据入口和ActiveRecord利用表关联对象来处理数据和对象间的关联操作。
查询对象
    查询对象封装了一次数据库查询。查询对象提供方法链风格的接口，让开发者可以创建复杂的查询。
表数据入口
    表数据入口封装针对一个数据表的操作，是一个高层的数据库接口。表数据入口为ActiveRecord提供数据库的CRUD服务。表数据入口支持扩展插件，从而在表操作的层次透明的改变应用程序和框架行为。
ActiveRecord
    ActiveRecord表面上看封装了一个数据库记录。但ActiveRecord实际上是一个领域对象。ActiveRecord封装了领域对象的属性和方法，并利用表数据入口来完成领域对象的持久化。

数据库适配器详解
QeePHP的适配器由两部分组成：QDB_Adapter_Abstract继承类和QDB_Result_Abstract继承类。
QDB_Adapter_Abstract为不同的数据库系统定义了一个统一的接口，而QDB_Result_Abstract则定义了查询结果集的统一接口。QDB_Adapter_Abstract继承类和QDB_Result_Abstract继承类会根据特定的数据库系统，实现抽象类中定义的方法。
设计思想
虽然数据库适配器的主要目标是为更上层的组件提供一个访问数据库的统一接口。但数据库适配器还有一个重要任务就是要能充分发挥不同数据库系统的能力。例如带有参数绑定的查询操作，在使用PHP的mysql扩展时，参数占位符将被替换为实际的参数值。但使用oracle、pgsql等扩展时，则会使用数据库系统支持的参数绑定模式来进行查询。同样，对于CLOB/BLOB、日期、元数据、事务都有不同的处理方式。
过去，更高层次的组件通常完成大部分工作，然后利用数据库适配器提供的查询接口来执行查询。这种方式实现容易，但是很难发挥数据库的自身能力。所以，在QeePHP的数据库架构中，许多工作转移到数据库适配器来完成。这样针对不同的数据库，可以采用最具效率的解决方法。
此外，各个数据库数据库适配器除了实现统一的接口，也为不同的数据库提供了特别的方法，以便开发者可以在应用程序中更直接的操作数据库来完成特别的需求。
规划接口
实现数据库适配器最大问题是如何确定一个统一的接口。例如mysql扩展不支持参数绑定，但mysqli和pdo都支持参数绑定。那参数绑定是否应该加入数据库适配器的统一接口中呢？而且数据库的不同版本，支持的特征也各不相同。例如mysql早期版本就不支持子查询，pgsql的早期版本则没有序列字段类型。那我们的统一接口又将如何规划这些特征呢？
通常，人们按照不同数据库功能的交集来设计统一接口。但这样做的结果就是连参数绑定这样的基本功能也从接口中消失了。所以在设计QeePHP的数据库适配器接口时，我们转变了设计思想。
首先，我们将过去没有包含在其他组件中的功能部分迁移到了数据库适配器中。例如对SQL查询语句的分析、SQL查询语句的构造等。这样做以后，虽然数据库适配器变得庞大了，但是也降低了高层组件的复杂性。并且可以在数据库适配器中针对不同数据库做出最优化的实现。
接下来，我们让数据库适配器能够更多的“感知”当前的“上下文”。举例而言，过去我们要获得一个新的序列值，仅仅是传递一个序列名称给适配器。现在则还要传递需要这个序列值的数据表、对应字段等信息。由于数据库适配器获得的信息更多，也就更容易针对特定情况进行优化。
第三步，我们需要为一些广泛使用的早期数据库系统（或者PHP扩展）模拟出一些新数据库才具备的特征。这里面的典型就是使用量最大的mysql扩展不支持参数绑定，所以我们必须模拟实现这个特征，并且尽可能保持较高的性能。好在QeePHP面向的用户通常都能够利用最新的软件和技术，所以这个问题不算突出。
最后，我们必须仔细斟酌，从而决定要为不同的数据库适配器添加数据库的哪些独有功能。这些功能如果太多，利用率则会下降，除了变成包袱没有任何意义。如果太少，那么开发者又很难发挥出数据库系统的极限能力。
实现
实现一个稳定可靠、高性能、具备良好兼容性的数据库适配器是不小的挑战。在具体实现时，我们参考了市面上几乎所有的数据库抽象层实现，尤其是Creole这个出色的数据库抽象层。不过对于QeePHP而言，数据库适配器应该小而强，不是大而全，因为更多复杂的功能将由数据库架构中更高层的组件来实现。
QDB_Adapter_Abstract、QDB_Result_Abstract等抽象类定义了数据库适配器的统一接口，并且实现了所有的公用操作。
QDB_Adapter_Abstract接口包含下列主要方法：

适配器状态

connect() 连接数据库
setSchema() 选择要使用的数据库
nextID() 获得指定序列的下一个值
insertID() 获得最后一次 INSERT 插入操作的主键值
affectedRows() 获得最后一个操作影响的记录总数


转义

qstr() 对值进行转义
qfield() 获得字段名的完全限定名
qtable() 获得数据表名称的完全限定名


查询

execute() 执行一个查询
selectLimit() 执行一个限定结果集的查询
getAll()、getRow()、getCol()、getOne() 查询并返回结果


事务

beginTrans() 开始事务，并返回一个QDB_Transaction对象
startTrans() 开始事务
completeTrans() 完成事务（提交或回滚）
failTrans() 将事务标识为失败
hasFailedQuery() 确定事务过程中是否有失败的查询


元数据

metaTabls() 获得匹配指定模式的数据表名称
metaColumns() 获得指定数据表的字段元数据


SQL构造

getInsertSQL() 生成INSERT语句
getUpdateSQL() 生成UPDATE语句
getReplaceSQL() [...]&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=2fea00952fba561596d6f5e93a5c87d8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=2fea00952fba561596d6f5e93a5c87d8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=922c437b3d2bb974d0a48f000fb74cc2&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=922c437b3d2bb974d0a48f000fb74cc2&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=bb4392cabccf8b4e300bf83ad476b989&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=bb4392cabccf8b4e300bf83ad476b989&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=b200b4a53597c85f173d0f9c746936e8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=b200b4a53597c85f173d0f9c746936e8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=c7888df79500ba7c559e02e510e7ed10&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=c7888df79500ba7c559e02e510e7ed10&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=58b2854eb4857bd1ef9b088aed06d1f9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=58b2854eb4857bd1ef9b088aed06d1f9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>query</category><category>Featured</category><category>QeePHP</category><category>Tutorials</category><pubDate>Sat, 12 Apr 2008 12:10:05 +0800</pubDate><author>dualface</author><comments>http://qeeify.com/index.php/2008/04/12/qeephp-architecture-01.html#comments</comments><guid isPermaLink="false">http://qeeify.com/index.php/2008/04/12/qeephp-%e6%95%b0%e6%8d%ae%e5%ba%93%e6%9e%b6%e6%9e%84%ef%bc%881%ef%bc%89.html</guid><dc:creator>dualface</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/04/12/qeephp-architecture-01.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142112/5106957</fs:itemid></item><item><title>改写教程</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142113/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/03/30/my-tutorials-modified.html/feed</wfw:commentRss><description>俺的系列教程改写ing.......嗯嗯&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=7e18daa30372938a1e88bb64894d401f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=7e18daa30372938a1e88bb64894d401f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=452f8bfa6f12ccd2eb80d9fd64e94413&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=452f8bfa6f12ccd2eb80d9fd64e94413&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=43b8cd1499d82218f15911545d16cf2b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=43b8cd1499d82218f15911545d16cf2b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=73268328496999a0f8d128cc63c15f1c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=73268328496999a0f8d128cc63c15f1c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=8528a90dda89f6273191b4a52d6853e2&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=8528a90dda89f6273191b4a52d6853e2&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=7c20b016ee4567ce467774078a05355b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=7c20b016ee4567ce467774078a05355b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>Asides</category><pubDate>Sun, 30 Mar 2008 19:15:14 +0800</pubDate><author>cc</author><comments>http://qeeify.com/index.php/2008/03/30/my-tutorials-modified.html#comments</comments><guid isPermaLink="false">http://qeeify.com/index.php/2008/03/30/my-tutorials-modified.html</guid><dc:creator>cc</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/03/30/my-tutorials-modified.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142113/5106957</fs:itemid></item><item><title>如何撰写漂亮的文章</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142114/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/03/30/howto-write.html/feed</wfw:commentRss><description>qeeify.com 使用的 WordPress 博客系统，总体上来说使用还是很简单的。但要撰写格式漂亮的文章，还是需要掌握一些基本操作。这篇文章提出了一些技巧和指导原则，可以帮助大家更好的撰写文章。&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=32c261dd1a9a86bab0a32de7e11c61ff&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=32c261dd1a9a86bab0a32de7e11c61ff&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=6b0605941f8e60e75b30bf422801f887&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=6b0605941f8e60e75b30bf422801f887&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=4921255f7560dbb0304c7dcff7697011&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=4921255f7560dbb0304c7dcff7697011&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=f654139db0f6a66e6f39d090e4d9be82&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=f654139db0f6a66e6f39d090e4d9be82&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=b01432bbacc38702f54a391dcccadd48&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=b01432bbacc38702f54a391dcccadd48&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=03a2c2812d1aae479da6fbf3c1d6c1c8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=03a2c2812d1aae479da6fbf3c1d6c1c8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>Featured</category><category>Cookbook</category><pubDate>Sun, 30 Mar 2008 17:45:27 +0800</pubDate><author>dualface</author><comments>http://qeeify.com/index.php/2008/03/30/howto-write.html#comments</comments><guid isPermaLink="false">http://qeeify.com/index.php/2008/03/30/howto-write.html</guid><dc:creator>dualface</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/03/30/howto-write.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142114/5106957</fs:itemid></item><item><title>QeePHP 版 MVCBlog</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142115/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/03/30/example-qeephp-mvcblog.html/feed</wfw:commentRss><description>大家好！小弟是 rainland，今天把 FleaPHP 中自带的 MVC_Blog 用 QeePHP 改写了下，希望大家一起进步，呵呵，错误之处，请留言，我好修改。程序完全是用 FleaPHP 中的数据表，模板也是。所以就很像了，大家肯定感觉亲切。还要感谢老大，给我们这么好的东东。呵呵。
创建应用程序
D:\cd wamp\www
D:\wamp\www\qeephp\scripts\chili.bat qeemvc_blog
实现列表功能
1、首先我们创建一个 posts 控制器：
D:\wamp\www\qeemvc_blog\php script\generate.php controller posts
成功的话是这样的：
Create file 'D:\wamp\www\qeemvc_blog/app/controller/posts_controller.php' 
successed.
Create directory 'D:\wamp\www\qeemvc_blog\app\view\posts' successed.
打开 D:\wamp\www\qeemvc_blog/app/controller/posts_controller.php，修改内容为
：
/**
     * 默认动作
     */
     function actionIndex()
{
        $select = Post::find()-&gt;limitPage((int)$this-&gt;context-&gt;page, $this-&gt;page_size);
    [...]&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=88e97d526ae2d165ca18f000984aeffd&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=88e97d526ae2d165ca18f000984aeffd&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=707caa4e1323bff3b82fe64a41a72d51&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=707caa4e1323bff3b82fe64a41a72d51&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=62fd028e8331790851a79985988e7ace&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=62fd028e8331790851a79985988e7ace&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=3220454ca78c85e6b50d6a2413dd315d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=3220454ca78c85e6b50d6a2413dd315d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=eac9f4dc780d9bb0f692b5a7218fc9c0&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=eac9f4dc780d9bb0f692b5a7218fc9c0&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=b6ab2a9e5fddde80585ae0ffc8e1276d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=b6ab2a9e5fddde80585ae0ffc8e1276d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>MVC</category><category>query</category><category>controller</category><category>model</category><category>database</category><category>QeePHP</category><category>view</category><category>template</category><category>behavior</category><pubDate>Sun, 30 Mar 2008 16:55:40 +0800</pubDate><author>rainland</author><comments>http://qeeify.com/index.php/2008/03/30/example-qeephp-mvcblog.html#comments</comments><guid isPermaLink="false">http://qeeify.com/index.php/2008/03/30/qeephp-%e7%89%88mvc_blog%ef%bc%88fleaphp%e8%87%aa%e5%b8%a6%e5%ae%9e%e4%be%8b%ef%bc%89%e4%b8%80.html</guid><dc:creator>rainland</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/03/30/example-qeephp-mvcblog.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142115/5106957</fs:itemid></item><item><title>如何使用模型的行为插件</title><link>http://item.feedsky.com/~feedsky/qeeify/~6998978/86142116/5106957/1/item.html</link><wfw:commentRss>http://qeeify.com/index.php/2008/03/27/howto-use-model-behavior.html/feed</wfw:commentRss><description>模型是 QeePHP 应用程序中用于封装业务逻辑的杀手锏，而行为插件则是把杀手锏变成终极武器的东东。行为插件可以在不修改代码的情况下，透明得改变一个模型的行为，所以称为行为插件。

先说一个最普遍的例子：无限级分类。
存储无限级分类，要么是使用比邻模式，要么是先根遍历算法。FleaPHP 的 SHOP 示例程序中有一个改进过的先根遍历算法，结合了比邻模式和先根遍历两种算法的优点，因此许多开发者都在使用这个算法。
QeePHP 中，有一个名为 tree 的行为插件。只要为模型加上这个行为插件，模型瞬间就可以实现无限级分类存储，并且使用改进型先根遍历算法。
给模型指定要使用的行为插件
在自动生成的模型的代码中，static function __define() 中有一行：

// 指定该 ActiveRecord 要使用的行为插件
'behaviors' =&amp;#62; '',

修改这行代码，加入我们要使用的行为插件：

// 指定该 ActiveRecord 要使用的行为插件
'behaviors' =&amp;#62; 'tree',

代码方面的准备工作就做好了，数据库方面要根据插件的要求添加一些必要字段。
tree 插件默认使用 parent_id、lft、rgt 存储无限分类。如果你的数据表字段名与此不同，则需要在指定插件的设置。
给行为插件指定配置
还是打开模型的代码文件，在指定行为插件的代码下面修改：

// 指定该 ActiveRecord 要使用的行为插件
'behaviors' =&amp;#62; 'tree',
// 指定行为插件的配置
'behaviors_settings' =&amp;#62; array&amp;#40;
&amp;#160; &amp;#160; 'tree' =&amp;#62; array&amp;#40;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; 'parent_id' =&amp;#62; 'parent_cat_id',
&amp;#160; &amp;#160; &amp;#160; &amp;#160; 'left'&amp;#160; &amp;#160; &amp;#160; =&amp;#62; 'left_value',
&amp;#160; &amp;#160; &amp;#160; &amp;#160; 'right'&amp;#160; [...]&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=9ea3f5fb52fb1a49d344ebb9c2d8962a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=9ea3f5fb52fb1a49d344ebb9c2d8962a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=7206190a9f8e6f9dc11fe00e930ebfbe&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=7206190a9f8e6f9dc11fe00e930ebfbe&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=19cb0f42590dfa0ad21e1fe047b9a293&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=19cb0f42590dfa0ad21e1fe047b9a293&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=37b5b4bba17534b052903d7bf59ebe4b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=37b5b4bba17534b052903d7bf59ebe4b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=2608a6710e8c3862fca27c69d69cf7fa&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=2608a6710e8c3862fca27c69d69cf7fa&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/qeeify?a=81bc78c9fd5b93e8a5c3e38db684a520&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/qeeify?i=81bc78c9fd5b93e8a5c3e38db684a520&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>Featured</category><category>model</category><category>QeePHP</category><category>Cookbook</category><category>behavior</category><pubDate>Thu, 27 Mar 2008 19:43:56 +0800</pubDate><author>dualface</author><comments>http://qeeify.com/index.php/2008/03/27/howto-use-model-behavior.html#comments</comments><guid isPermaLink="false">http://qeeify.com/index.php/2008/03/27/howto-use-model-behavior.html</guid><dc:creator>dualface</dc:creator><fs:srclink>http://qeeify.com/index.php/2008/03/27/howto-use-model-behavior.html</fs:srclink><fs:srcfeed>http://qeeify.com/index.php/feed</fs:srcfeed><fs:itemid>feedsky/qeeify/~6998978/86142116/5106957</fs:itemid></item></channel></rss>