Home arrow PHP arrow Controlling Online Forms with Builder Objects in PHP 5

Controlling Online Forms with Builder Objects in PHP 5

Mastering some of the most popular design patterns with PHP 5 can be sometimes an overwhelming process that requires hard work and experience. However, if you want to tackle the challenge and expand your existing background on them, this article might eventually find a place on your quick reference list.

  1. Controlling Online Forms with Builder Objects in PHP 5
  2. Defining a form element class
  3. Creating a form builder class
  4. Constructing a basic online form
By: Alejandro Gervasio
Rating: starstarstarstarstar / 9
October 11, 2006

print this article




This is the second part of the series "How to use builder objects in PHP 5." Made up of three tutorials, this series introduces the basics of working with directors and builders with PHP, and teaches you how to use them in real-world environments.

One of the most interesting aspects of working with design patterns that fall under the creation category rests on understating the different relationships that can be defined between two or more objects to build a third one. That's exactly the logic that stands behind using directors and builders. That concept was deeply covered in the first article, when I set up an introductory example for generating basic XML pages.

As an useful reminder, allow me to explain quickly what I mean when I talk about using directors and builders. In short, these two types of objects are used in conjunction to build another one via a well-defined behavior. This behavior is defined as follows: first, the builder is responsible for creating the target object, while the director, as its name implies, establishes what specific parts of the third object should be included in the creation process. Does this definition sound familiar to you? I hope it does.

Okay, once the key concepts surrounding the implementation of the builder pattern with PHP have been properly grasped, it's time to leap forward and continue learning more hands-on examples. Specifically, in this second article of the series, I'll go deeper into the topic and show you how to use both directors and builders to construct and control programmatically online forms.

Having established the goals of this article, let's jump straight into the subject and find out how web forms can be created by using the builder pattern. Let's get going!

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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- 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: