HomePHP Building Object-Oriented Database Interfaces in PHP: Updating the Application to PHP 5
Building Object-Oriented Database Interfaces in PHP: Updating the Application to PHP 5
In this fourth and final article in the tutorial series, Alejandro Gervasio updates the "DBIGenerator" class developed in the previous articles. The new version incorporates features in PHP 5, such as member visibility, exceptions, and other useful items.
This is the final article in the series "Building Object-Oriented Database Interfaces in PHP." Welcome back. After going through the previous articles, we've introduced ourselves to the interesting subject of database interfaces, explaining some key concepts as a straightforward way to get a better grounding in the topic. I provided a friendly set of examples, aimed primarily at implementing these programming structures in real applications.
Despite the fact that the subject is far from being fully covered, due mainly to the different approximations applied to accessing database tables through centralized mechanisms, hopefully the issue has been thoroughly treated.
However, as you know, PHP is a fast-growing language, which has taken a large step forward with the release of PHP 5. As this version is widely adopted by developers and hosting service providers, we need to tackle this rather uncovered aspect, porting most of the source code shown in the previous articles to PHP 5, in order to get updated to the current PHP development tendencies.
Confronted with this situation, in this last article I'll show the updated version of the "DBIGenerator" class, along with a few basic examples of usage, incorporating some of the most exciting new features present in PHP 5, such as member visibility, exceptions and other goodies.
Whether you're a developer currently using PHP 4 or making the leap to PHP 5, the article provides you with a friendly introduction to implementing database interfaces in PHP 5.
With the preliminaries out of the way, let's get started.