Re: When and where to use Visitor Pattern?
- From: Rich MacDonald <rich@@clevercaboose.com>
- Date: Wed, 27 Apr 2005 00:46:29 GMT
"Ilja Preuß" <it@xxxxxxxxxxxxx> wrote in
news:426ba2dc@xxxxxxxxxxxxxxxxxxxxxxx:
>> Why make it so complicated?
>
> Decoupling. There are simply situations where you don't want to touch
> the original class when you need to change a specific operation, or
> where you even want to allow the definition of additional operations
> without having to touch them.
Or the fact that that original class(es) needs to "do a hundred things".
Rather than add all that stuff into the class and create a mess, you keep
it lean and delegate off to a hundred visitors.
Done well, I consider it the most useful and powerful pattern I know.
.
- Follow-Ups:
- Re: When and where to use Visitor Pattern?
- From: Wavemaker
- Re: When and where to use Visitor Pattern?
- From: Daniel Parker
- Re: When and where to use Visitor Pattern?
- References:
- When and where to use Visitor Pattern?
- From: Sam Hwang
- Re: When and where to use Visitor Pattern?
- From: Ilja Preuß
- When and where to use Visitor Pattern?
- Prev by Date: DOES ANY GLASS CLEANERS WANT THEIR PAPER WORK DONE EVERY DAY
- Next by Date: Re: When and where to use Visitor Pattern?
- Previous by thread: Re: When and where to use Visitor Pattern?
- Next by thread: Re: When and where to use Visitor Pattern?
- Index(es):
Relevant Pages
|