Upgrading to PHP 5
By Adam Trachtenberg
Table of Contents
Index
Sample Chapter
Read Online--Safari Search this book on Safari:
Only This Book All of Safari
Code Fragments only
DataObject performs two tasks. First, it builds SQL statements based on the object''s variables and the builder
methods. Second, it acts as a datastore for a table row. There''s a core class, which you extend for each of
your tables so that you put the data logic inside the data classes. There''s also an included Generator to make
your configuration files and your base classes.
DataObject 執行兩個任務.第一,它構建基於物件變數的SQL語句和構建器方法.第二,它作為資料庫表的資料存
儲.這裡有個核心類,對於每個表繼承它,以使你把資料邏輯放入資料類中.這裡還包括一個產生器,
DataObject 極大的簡化了資料庫存取碼,它使開發大型的,資料驅動的網站更加容易.
At present, Alan Knowles, the lead developer of PEAR::DB_DataObject, is working on a new project called DBDO,
a C implementation of the PEAR package DB_DataObjects, based on libgda. His goal is to create the next
generation of PEAR::DB_DataObjects.
SMARTY
Smarty是一個從web頁示範中分離內容的PHP模板引擎.它使用GPL許可.
Large projects commonly separate the role of the graphic designer from that of the programmer. However,
programming in PHP has the tendency to combine those two roles in a person and inside the code. This can bring
difficulties when it comes time to change some part of the page''s design. If the page mixes content and
presentation, the developer has to crawl through the program to find the presentation. Smarty helps to solve
this problem.
Combining the Two
The first thing to do when starting this project is