[squeak-dev] Re: Some question regarding portability

Sven Van Caekenberghe sven at beta9.be
Tue May 10 13:34:28 UTC 2011


On 10 May 2011, at 14:45, Andreas Raab wrote:

>>>> - 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.

I agree that Announcements are pretty simple.
Still, if it is available, then why not use it.
Sharing and reusing general purpose classes seems pretty important and elementary to me.

Of course, this sharing and reuse makes package management and dependencies more difficult.

For example, I need MD5, for which it seems to be necessary to load Cryptography in Squeak, a quite large framework that seems to be under development (many unit tests failed, MD5 works OK). You have chosen a shortcut in WebClient by implementing MD5 yourself. This runs against the refactoring rule but makes it easier for users because they don't need to load a dependency.

I think reimplementing something should only be done when the original does not work (properly) and cannot easily be fixed. I do have ZnMimeType, ZnUrl and ZnCharacterEncoding objects, which I wrote after having struggled with the originals for too long.

Sven




More information about the Squeak-dev mailing list