News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Introducing Builder Objects in PHP 5
October 04, 2006 @ 15:03:57

DevShed kicks off another three-parts series today with part one of a look at working with builder objects in PHP5.

In this article, the first of a three-part series, you will be introduced to the basics of creating directors and builder objects with PHP 5. As usual, there will be copious examples to help you quickly start using the builder pattern in your own PHP projects.

Well, to put things in a simple perspective, when the builder pattern is applied, two objects are put into action to create a third one. First, these two objects create a director; as its name suggests, the director controls all aspects of the creation process and determines what pieces and modifications will be introduced into the target object. Finally, a builder is tasked with constructing the third object in question, in accordance with particular specifications. Sounds fairly simple, doesn't it?

They start with a look at starting with the Builder pattern, building a basic XML document to provide the structure for the target object. From that information, they show how to create the object and give a simple class to help direct that object along.

0 comments voice your opinion now!
builder prattern object xml creation director class builder prattern object xml creation director class


blog comments powered by Disqus

Similar Posts

Richard Thomas's Blog: Pjq - PHP Jquery helper

CodeSnipers.com: Embarking on PHP5 Objects

Stefan Mischook's Blog: Classes and Objects in PHP

Stuart Herbert's Blog: Investigating A PDO Segfault

Wojciech Sznapka's Blog: Why Mockery is better than PHPUnit Mock Builder (with Symfony2)


Community Events

Don't see your event here?
Let us know!


interview conference example release framework application community symfony2 laravel voicesoftheelephpant api opinion introduction version php7 extension podcast performance library series

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework