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

Posted by FluffyCat on 11/25/05 19:22

On Wed, 23 Nov 2005 22:50:57 GMT, Oli Filth <catch@olifilth.co.uk>
wrote:

>FluffyCat said the following on 23/11/2005 22:40:
>> New on November 23, 2005 for www.FluffyCat.com PHP 5 Design Pattern
>> Examples - the Facade Pattern.
>>
>> This is a pattern that most complex systems use. In the facade a
>> class hides a comlex susbsystem from the calling class, and also hides
>> the calling class from the subsystem.
>>
>> My sample makes extensive use of static functions in the subsystem.
>> This seems to make sense if the calling class and subsystem can't be
>> aware of each other.
>>
>> http://www.fluffycat.com/SDCMSv2/PHP-Design-Patterns-Facade/
>>
>
>That's not really a pattern as such, is it? It's merely an example of
>encapsulation/functional abstraction. Which is one of the fundamental
>underlying principles of OO design. To call this a pattern is like
>saying that using a function is a pattern.


Yes, I completely agree with you. The facade pattern could almost be
called the function pattern. I Ithink it may be included in most
pattern catalogs, including "Design Patterns - Elements of Reusable
Object-Oriented Software" by Gamma, Helm, Johnson and Vlissides,
because it is so prevelant in most systems. Since my intent is to
give examples in PHP 5 of the most commonly accepted patterns, and not
alter or exclude any, I added Facade to my site. It didn't hurt that
it was fairly straight forward to put an example together. I did my
example with statics partly to emphasize that it isn't the most OO of
patterns, which hopefully does capture the way previous works have
documented the facade pattern. Thanks for asking about that, as I
felt more than once while working on the Facade that while it is
certainly common and useful, it isn't as OO as say the Visitor
pattern, which I was working on at the same time.

 

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

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