PHP, Zend Framework and Other Crazy Stuff
PHP Data Objects: Simplifying Business Logic without SQL
I was recently talked into writing an article on building a simple ORM solution in PHP for a local developers group. I finished this up recently, and after releasing it primarily to the Devnetwork Forums Tutorials category, I am also blogging it here for those interested.
Introduction
The goal of this tutorial is to demonstrate a system for manipulating a database without writing SQL queries. I introduce a number of concepts including the DataObject and DataAccessObject which together allow developers focus on manipulating data without needing to write, or even know SQL. This kind of system can be referred to as Object Relational Mapping (ORM) where tables and rows in a database are represented by PHP objects which may be used to perform common database operations. It is a very simple system to use in practice, and has become a common component of many popular PHP frameworks.
In the tutorial I implement such a system integrating database abstraction, i.e. the ability to operate on several or more database management systems such as MySQL or PostgreSQL, using ADOdb Lite. The tutorial is not very complex, but does assume you are aware of Object Oriented Programming basics in PHP and are familiar with the basics of using a database in PHP.
So if using a system where you can manipulate a database without writing lines of SQL appeals to you, then read on…
.
The entire tutorial is now posted at: http://forums.devnetwork.net/viewtopic.php?t=48499
Related posts:
| Print article | This entry was posted by Pádraic Brady on May 17, 2006 at 2:27 am, and is filed under Uncategorized. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
-
http://www.visionsofdarkness.net/blog Moocat
-
http://blog.quantum-star.com Maugrim

