You are here: Re: The Adapter Design Pattern in PHP 5 « PHP Programming Language « IT news, forums, messages
Re: The Adapter Design Pattern in PHP 5

Posted by Richard Levasseur on 12/17/58 11:51

FluffyCat wrote:
> Last month I continued my series of design patterns examples using PHP
> 5 with the Observer Pattern and the Prototype Pattern. Here now is my
> 16th example, the Adapter pattern.
>
> http://www.fluffycat.com/PHP-Design-Patterns/Adapter/
>
> In the Adapter Pattern we adapt a class we have to provide methods
> another class needs, without changing the original class.
>
> If you work with a lot of classes that you can not change, then this
> pattern is certainly something you would want to consider using on a
> regular basis.

Wow, thats a very nice website you have. Some very clean examples,
though a bit more explanation might be needed for some. It contains
some things that every developer should know, especially PHP ones,
since most PHP devs aren't formally taught these concepts.

For the iterator pattern you should note that there is a native
iterator interface in PHP5 (several, actually), allowing you to iterate
over arbitrary objects using foreach(). Other interfaces are available
to allow array access with [], using count(), etc etc.

Might want to note that only the most recent versions of MySQL support
the really useful SQL features, too, simply because MySQL < 4.1 is
still so common.

A short blurb or links about database normalization could be helpful,
too.

 

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

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