Re: the Visitor Design Pattern




FluffyCat wrote:
> New on November 28, 2005 for www.FluffyCat.com PHP 5 Design Pattern
> Examples - the Visitor Pattern.
>
> In the Visitor pattern, one class calls a function in another class
> and passes an instance of itself. The called class has special
> functions for each class that can call it.
>
> With the visitor pattern, the calling class can have new operations
> added without being changed itself.
>
> http://www.fluffycat.com/SDCMSv2/PHP-Design-Patterns-Visitor/

A class that passes an instance of itself to another class means you
don't freaking know what you're doing. What's next? The spaghetti
design pattern?

.



Relevant Pages

  • Re: the Visitor Design Pattern
    ... Chung Leong wrote: ... > FluffyCat wrote: ... >> In the Visitor pattern, one class calls a function in another class ... passing this to a method in another object, ...
    (comp.lang.php)
  • Re: Borland Roadshow UK 2006 (9th May)
    ... It seems to me that you are saying that a design pattern is only a design ... write code for a Visitor Pattern it is no longer a visitor pattern. ... believe that a "code pattern" is an ...
    (borland.public.delphi.non-technical)