PHP
  Home arrow PHP arrow Creating a Blog Application with Inter...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Creating a Blog Application with Interpreter Classes with PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 10
    2007-04-16

    Table of Contents:
  • Creating a Blog Application with Interpreter Classes with PHP 5
  • Working with MySQL
  • Defining a basic blog interpreter class
  • The interpreter pattern in action

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Creating a Blog Application with Interpreter Classes with PHP 5


    (Page 1 of 4 )

    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.

    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


       · Over the course of this final installment of the series you’ll learn by a step-by...
     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT