You are here: The Builder Design Pattern using PHP5 « PHP Programming Language « IT news, forums, messages
The Builder Design Pattern using PHP5

Posted by FluffyCat on 05/04/06 03:26

Last fall I started a series of design pattern examples using PHP5. I
think the last pattern I did was the Singleton in January. Getting
back to it here is my first cut at the Builder pattern.

http://www.fluffycat.com/PHP-Design-Patterns-Builder/

In the builder pattern a director and builder work togther to build an
object. The director controls the building and specifies any
variations that can be done with the object. The builder knows how to
build the object.

There are a couple things I'm not 100% sure of yet in my example.

I use of a formatPage() function in my HTMLPage.php. I'm not sure if
it should be there or in the builder.

I only have a HTMLPage builder shown, but perhaps to be a complete
example a contrasting XMLPage or RSSPage builder would be helpful.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация