Hi,
I was wondering were I can find some concret exemple of Decorator pattern in squeak.
And also:Adapter(I don't really understand the use of it)
Abstract Factory
Builder
and Factory methode
thanks, Math
But this is different :) and in seaside just the name is the same. The decorator in Seaside are in fact chain of responsibility :)
Stef On 21 juin 06, at 14:39, Damien Cassou wrote:
Mathieu SUEN a écrit :
Hi, I was wondering were I can find some concret exemple of Decorator pattern in squeak.
I think Seaside and Pier use the Decorator pattern. _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Il giorno mer, 21/06/2006 alle 14.07 +0200, Mathieu SUEN ha scritto:
Hi,
I was wondering were I can find some concret exemple of Decorator pattern in squeak.
In Squeak 3.8, look at the FlashFileStream class.
And also:Adapter(I don't really understand the use of it)
This I don't know.
Abstract Factory
I'm not sure, but for abstract factory maybe you could look into ToolBuilder for Squeak 3.9.
Builder
The GoF book cites Parser, ClassBuilder as examples of the Builder pattern.
and Factory methode
The GoF book cites Behavior>>parserClass as an example of this pattern.
Giovanni
In fact it would be really nice to have a list of the pattern usage.
Stef
Il giorno mer, 21/06/2006 alle 14.07 +0200, Mathieu SUEN ha scritto:
Hi,
I was wondering were I can find some concret exemple of Decorator pattern in squeak.
In Squeak 3.8, look at the FlashFileStream class.
And also:Adapter(I don't really understand the use of it)
This I don't know.
Abstract Factory
I'm not sure, but for abstract factory maybe you could look into ToolBuilder for Squeak 3.9.
Builder
The GoF book cites Parser, ClassBuilder as examples of the Builder pattern.
and Factory methode
The GoF book cites Behavior>>parserClass as an example of this pattern.
Giovanni
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Yes, :-)
Do Roel Wuyts can do something for us? ;-)
2006/6/22, stéphane ducasse ducasse@iam.unibe.ch:
In fact it would be really nice to have a list of the pattern usage.
Stef
Il giorno mer, 21/06/2006 alle 14.07 +0200, Mathieu SUEN ha scritto:
Hi,
I was wondering were I can find some concret exemple of Decorator pattern in squeak.
In Squeak 3.8, look at the FlashFileStream class.
And also:Adapter(I don't really understand the use of it)
This I don't know.
Abstract Factory
I'm not sure, but for abstract factory maybe you could look into ToolBuilder for Squeak 3.9.
Builder
The GoF book cites Parser, ClassBuilder as examples of the Builder pattern.
and Factory methode
The GoF book cites Behavior>>parserClass as an example of this pattern.
Giovanni
I can sing and dance :-)
Given more time I could even try to detect you all kinds of pattern instances, but for that we'd need to port Soul to Squeak again.
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.
On 22 Jun 2006, at 10:36, Mathieu SUEN wrote:
Yes, :-)
Do Roel Wuyts can do something for us? ;-)
2006/6/22, stéphane ducasse ducasse@iam.unibe.ch:
In fact it would be really nice to have a list of the pattern usage.
Stef
Il giorno mer, 21/06/2006 alle 14.07 +0200, Mathieu SUEN ha
scritto:
Hi,
I was wondering were I can find some concret exemple of Decorator pattern in squeak.
In Squeak 3.8, look at the FlashFileStream class.
And also:Adapter(I don't really understand the use of it)
This I don't know.
Abstract Factory
I'm not sure, but for abstract factory maybe you could look into ToolBuilder for Squeak 3.9.
Builder
The GoF book cites Parser, ClassBuilder as examples of the Builder pattern.
and Factory methode
The GoF book cites Behavior>>parserClass as an example of this pattern.
Giovanni
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
2006/6/22, Roel Wuyts Roel.Wuyts@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?
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@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@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Adaptor isn't so popular of a pattern in Smalltalk because its easy to simply adapt a class by implementing the desired protocol in a category. People seldom bother to create a new class just to adapt something.
On Thursday, June 22, 2006, at 05:40AM, Mathieu SUEN mathk.sue@gmail.com wrote:
2006/6/22, Roel Wuyts Roel.Wuyts@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@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
beginners@lists.squeakfoundation.org