Home arrow PHP arrow Creating a Blog Application with Interpreter Classes with PHP 5

Creating a Blog Application with Interpreter Classes with PHP 5

Working with interpreter classes in PHP 5 can be a useful experience for any PHP developer. Welcome to the final part of the series that began with “Building Interpreter Classes with PHP 5.” Composed of three educational tutorials, this series teaches you how to implement the interpreter pattern with PHP, by covering not only the corresponding theoretical concepts, but also showing you concrete cases where this pattern can be applied in a useful way.

TABLE OF CONTENTS:
  1. Creating a Blog Application with Interpreter Classes with PHP 5
  2. Working with MySQL
  3. Defining a basic blog interpreter class
  4. The interpreter pattern in action
By: Alejandro Gervasio
Rating: starstarstarstarstar / 10
April 16, 2007

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

If you read the two previous articles of the series and examined the numerous code samples shown in these tutorials, it's quite probable that building interpreter classes with PHP 5 is now a familiar process to you, which can be tackled effortlessly. Nonetheless, if this pattern doesn't ring any bells to you, let me give you a quick introduction to how it works. In doing so, I certainly believe that you'll be much better equipped to grasp the logic of the hands-on example that I plan to develop in this final part of the series.

In plain terms, when the interpreter pattern is implemented, on one hand there's a class, obviously called "interpreter," which is tasked with parsing a set of predefined commands to perform a number of specific tasks. On the other hand there's one or more additional classes, which are responsible for sending those commands to the interpreter, in this way establishing a well-defined relationship between all these classes.

Of course, after rereading the previous definition, you might think that an interpreter class is some kind of basic parser. That's completely correct. As you can see, the logic that drives the interpreter pattern is rather easy to understand and implement with functional PHP code. Therefore, in this final installment of the series, I'm going to demonstrate how to get the most out of this handy pattern by developing a highly expansible blogging application. The application will be able to insert, update and delete blog entries, using a simple MySQL database as backend.

Having established the topics that will be covered in the next few lines, let's move on and learn together how to apply the interpreter pattern to build a simple blogging system. Let's begin now!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: