Reply to the Strategy Pattern in PHP 5

Your name:

Reply:


Posted by ltruett@fluffycat.com on 08/29/06 22:49

I'm almost done my series of design patterns using PHP 5. Today's
pattern is the Strategy Pattern.

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

In the Stratedy Pattern a "family of algorythms" is used interchangably
by calling clients.

This is the second pattern in as many days as I've used my older work
with patterns in Java, and again I liked the old example when I first
looked at it, but now I wonder about it. In this example the context
is passed a parameter at instantiation, and the context then chooses a
concrete strategy which it hold on to for every time it needs a
strategy. This means that the calling client would need to call the
appropriate context. Not sure if this is the real intent here, might
have to revisit this one...

[Back to original 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

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