[Newbies] Exemple of pattern

Roel Wuyts Roel.Wuyts at ulb.ac.be
Thu Jun 22 14:49:22 UTC 2006


Yes, I mean, I didn't want to say that every wrapper class is an  
Adaptor. Just that in my experience, if you want to find examples of  
adaptors, looking through wrapper classes might yield you some examples.

And indeed, up until a certain point adaptors and decorators might  
look similar. Adaptors typically (but not necessarily!) translate  
interfaces (e.g. they implement methods that a client class expects).  
Or it might happen that they adapt semantics (in which case they will  
implement methods with the same signature but adapt the behaviour to  
be consistent with what a client expects). Decorators typically  
override methods. Therefore the client cannot make the difference  
between a non-decorated and a decorated object, and just sends a  
polymorphic method.

Note that these are just very brief summaries of the much more  
extensive discussions found in the design pattern book...

On 22 Jun 2006, at 14:40, Mathieu SUEN wrote:

> 2006/6/22, Roel Wuyts <Roel.Wuyts at ulb.ac.be>:
>> I can sing and dance :-)
>>
>> Given more time
>
> Of course! No problem.
>
>
>> For the Adaptor thing, any wrapper class will do. There have to exist
>> such classes in Squeak. Doing a search for classes that ends in
>> Wrapper will probably yield some examples.
>
> Ok I will searche for it. .. But the Decorator pattern use also this
> convention. Don't he?
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>



More information about the Beginners mailing list