|
Posted by FluffyCat on 11/10/05 22:56
I struggled to come up with at least one good new pattern example this
week. I'm still grappling with PHP5 implementations for the visitor
and facade, but to no avail. I instead, did get an idea for the
decorator pattern. The decorator pattern is good to keep in mind when
you need to add functionality to a class, but changing that class is
not possible or undesirable.
http://www.fluffycat.com/SDCMSv2/PHP-Design-Patterns-Decorator/
After my the Decorator pattern went well, I wanted to get a second
PHP5 pattern done this week. The Iterator pattern should seem
familiar to anyone who has worked with Java. The java.util.ArrayList
and java.util.ListIterator were staples in most Java systems. Using
that basic functionality I put together something similar for PHP.
http://www.fluffycat.com/SDCMSv2/PHP-Design-Patterns-Iterator/
On Wed, 26 Oct 2005 19:04:59 -0700, FluffyCat <LTruett@FluffyCat.com>
wrote:
>In early 2002 I did examples of all 23 of the classic "Gang Of Four"
>design patterns for my website in Java. Partly I wanted to get a
>better understanding of those patterns. They are still online at
>http://www.fluffycat.com/java/patterns.html
>
>Since mid 2003 I've mostly been using PHP, and now that PHP 5 is
>becoming more widely available I am eager to try the same thing I did
>in Java with PHP.
>
>So far I have only completed my pages for Abstract Factory and Factory
>Method, and I have a pretty good idea of what I will do for Composite
>and Memento. If any other pattern loving PHP enthusiasts want to
>check ot out I'd love your feedback:
>
>http://www.fluffycat.com/SDCMSv2/
Navigation:
[Reply to this message]
|