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  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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: starstarstarstarstar / 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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    Stay green...Green IT