PHP
  Home arrow PHP arrow Developing a Form Director Class
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 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
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

Developing a Form Director Class
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2006-10-18

    Table of Contents:
  • Developing a Form Director Class
  • Refreshing some core concepts
  • The form builder class
  • Defining a form director class

  • 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


    Developing a Form Director Class


    (Page 1 of 4 )

    Are you interested in expanding your knowledge of creational design patterns and learning how to work with director and builder objects in PHP 5? If your answer is yes, then I think you should start reading this article right now! Welcome to the concluding part of the series “How to Use Builder Objects in PHP 5.” This series leads you through the application of the builder pattern in PHP, and shows you how to use it with copious hands-on examples.

    Introduction

    When it comes to using creational patterns with PHP, undoubtedly the builder pattern is one of the most understandable, since the logic that stands behind its application is fairly easy to grasp. On the one hand you have a target object, which needs to be programmatically created, while on the other one you count on two objects, called "director" and "builder" respectively, that control the entire creation process.

    In this situation, the director instructs the builder as to what pieces and parts should be included in the target object, a process that is usually performed by injecting the builder directly into the director's constructor. Of course, this definition can be extended beyond this bunch of buzzwords, and used in the context of a real world application, which helps in understanding how this pattern works.

    Keeping in mind this practical approach, during the previous article I showed you how to use a few form element objects, along with a form builder class, to create online forms. However, as you'll possibly recall, the implementation of the builder pattern was rather incomplete because the respective form director class remained undefined, a fact that I plan to fix quickly over the course of this last tutorial.

    As I expressed above, in this article I'll complete the builder pattern, since I'll demonstrate how to define and use a form director class, in this way putting the final strokes on the example that you learned in the previous tutorial.

    With the preliminaries out of our way, let's find out together how to create a form director class!

    More PHP Articles
    More By Alejandro Gervasio


       · In this final part of the series, you'll learn how to build a form director class,...
     

       

    PHP ARTICLES

    - Validating Web Forms with the Code Igniter P...
    - Output Buffering
    - Paginating Database Records with the Code Ig...
    - HTTP Headers in Web Development
    - Project Management: Administration
    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway