[squeak-dev] Re: Some question regarding portability

Igor Stasenko siguctua at gmail.com
Tue May 10 14:05:37 UTC 2011


On 10 May 2011 14:45, Andreas Raab <andreas.raab at gmx.de> wrote:
> On 5/10/2011 12:21, Sven Van Caekenberghe wrote:
>>
>> On 10 May 2011, at 11:48, Levente Uzonyi wrote:
>>
>>> On Tue, 10 May 2011, Sven Van Caekenberghe wrote:
>>>
>>>> Hi All,
>>>>
>>>> I would like to improve the portability of Zinc HTTP Components (
>>>> http://zn.stfx.eu ) to Squeak. During the development of Zn I have regulary
>>>> tested on Squeak (currently 4.2 #10977), and most of the code works
>>>> unmodified. Recently, I had another look, and I would like to fix some
>>>> issues, if possible.
>>>>
>>>> - Are announcements available ? Can this framework be loaded ? What is
>>>> the official way to do this ?
>>>
>>> There are at least four different implementations of the announcements
>>> framework. They are not (fully) compatible with each other. The question is:
>>> which one is required by Zinc?
>>
>> I am not aware of that many versions.
>> I subclass Announcement, instanciate an Announcer, send #announce: and
>> #on:send:do to it, that's all.
>
> Then how about adding ZnAnnouncement, ZnAnnouncer with the two or three
> methods that you actually need? Announcements always struck me as more of a
> pattern than a framework.
>

Yes, this is a typical observer pattern.
However, a framework is needed to nicely manage subscriptions.
Because if everyone will start implementing this pattern by own, then
you end up with multiple subsystems which basicly doing the same work
(because pattern is same!).

See
Object>>addDependent: anObject  and Object>>changed:

Then see
Object>>actionMap & Object>>triggerEvent: anEventSelector

and then at some point, a developer get lost, which one he should actually use.
That's why Pharo plans to unify all those subscription/event
triggering mechanisms and replace them with single one -
announcements.

-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list