[Modules] Who's afraid of making modules?

danielv at netvision.net.il danielv at netvision.net.il
Wed May 22 18:02:46 UTC 2002


Just kidding, but getting into modules has a bit of a learning curve,
and it looks steeper from far away.

So, from the tiny bit of experience I do have in this realm, I offer to 
help anyone that wants to get started on unloading modules.

Here are a few guideline for starting out easy-
* Pick code you already know.
* Pick a small category, or code that doesn't even have it's own
catogry, but could.
* Pick on the strays. Find something that isn't tied into the basic
classes like Morph. Applictions are easier. New code is easier. SqC
Morphic code seems relatively hard (from my very limited probing).
* You don't have to unload everything that starts out in your category.
If it started out partitioned right, we wouldn't have to do much, right?
if you want to unload only half the classes (and they make sense as a
unit), make them into their own module, and do just that.
* You don't have to finish the actual project you start with, you'll be
wiser afterwards anyway.
* Don't worry about someone else starting on the same project, the floor
isn't crowded yet ;-)

To make something unload, it has to make it's dependents happy without
it. If you pick an application or silly utility, it will have less
important/complex dependents.

To find the dependents (and a module with few of those), the first thing
you have run is (for that module..):
myMod _ (Module @ #(Squeak Network Applications MailReader)).
myMod deepIncomingRefsFromOutside: myMod <explore - it>

This gives you the number of classes in your module that things outside
it depend on. If it's more than ten top level entries, you might want to
start elsewhere...

That's it, any questions welcome on or off list.

Daniel



More information about the Squeak-dev mailing list