2011/4/7 Alain Plantec <[email protected]>:
> Le 07/04/2011 19:23, Igor Stasenko a écrit :
>>
>> button1 model: (self for: #performAction adapt: #turnRed)
>> button2 model: (self for: #performAction adapt: #turnGreen)
>
> yes, cool!
> It seems to be a good way to clean morphic
> cheers
> Alain
>
>

Yes, it's delegating the job to specialized objects.
Specialized objects shall know how to.
That should prevent Morphs to be omniscient.

My favourite name for the opposite pattern is "god programming": we
all encountered the thousand lines functions with tons of imbricated
if/switch logic in C or C// world, didn't we ?

Somehow, Igor proposal reminds me the VW UI architecture were they
pushed the wrapper pattern very far.
Personnally, I found myself comfortable with it, but it had its detractors too.
It would be interesting to analyze their arguments.

cheers.

Nicolas

Reply via email to