Tuesday, 17 April 2007
Article: Learn to Create a Blog Application with Interpreter Classes in PHP 5 |
| |
|
| |
In the final article of a three part series, Alejandro Gervasio teaches you how to implement the interpreter pattern with PHP, by covering not only the corresponding theoretical concepts, but also showing you cases where the pattern can be applied in a useful way.
In the first article of the series, he illustrated how to use an interpreter class to handle a group of fictional users.
In the second article, he taught you how to utilize this pattern for manipulating a set of string processing classes.
In the last article of the series, he demonstrates how to implement this pattern by developing a blogging application. The application will be able to insert, update and delete blog entries, using a simple MySQL database as backend.
He carries out the process of building the blogging system under the following sections:
- Working with MySQL: he starts the tutorial by defining a pair of MySQL processing classes. He asserts that this will allow interaction with the database server in a seamless way.
- Defining a basic blog interpreter class: he builds a simple PHP class. He builds a logical representation of a typical blog entry, where all its attributes, including its title, author and content will be saved as class properties.
- The interpreter pattern in action: in this section, he includes an illustrative example of how to use the interpreter class to add some blog entries to a sample ‘blogs’ database, update one of them, and finally delete another entry.
|
| |
|
Read the Post
Related Reading: Learn About Interpreter Class with PHP 5
Related Reading: Learn to Manipulate String Literals with Interpreter Classes
|
| |
|
|
| |
|
|
| |
|