Can someone explain how the organisation of classes in Pharo works in different versions of Pharo?
In addition there is SystemNavigation which somehow helps navigating classes and methods based on some of the above mentioned constructs?
Classes
The fact that classes are keys in the Smalltalk
global is an implementation detail. As long as there is a single global namespace for class names, it is likely that the implementation will stay the same.
Class Categories
The class category is very much like a tag. A class can only be in one category at a time. Originally the class category was used by the Browser
for organizing the classes in the system.
When Monticello
was created, the class category was overloaded to also indicate membership in a Monticello package theMCPackage
and PackageInfo
classes were created to manage this mapping.
PackageInfo
does all the heavy lifting: finding the classes and loose methods that belong to a package.
MCPackage
is a Monticello-specific wrapper for PackageInfo
that adds some protocol that wasn't necessarily appropriate for the more general PackageInfo
.
Packages
Overloading the class category for package membership was a neat trick to ease the adoption of Monticello
(existing development tools didn't need to be taught Monticello
), however, it is still a trick. Not to mention the fact that the implementation of PackageInfo
was not very efficient.
RPackage
was created to address the performance problems of PackageInfo
and to be used as part of the next generation of development tools.
Both package implementations will continue to exist until PackageInfo
can be phased out.
SystemNavigation
As Frank says,
SystemNavigation is a class that, as its name suggests, permits easy querying of a number of different things: the classes in the image, senders-of, implementors-of, information about packages loaded in the image and so on.
Classes are, at the moment at least, the keys in the Smalltalk
dictionary.
PackageInfo
contains information about a grouping of classes and extensions to other packages.
A Monticello package contains a deployable unit of code. Usually one of these will correspond to a PackageInfo
instance. (Hitting the "+Package" button in a Monticello Browser will create one of these, for instance.) A Monticello package may contain pre-load and post-load scripts, so the two classes perform separate, if related, functions.
SystemNavigation
is a class that, as its name suggests, permits easy querying of a number of different things: the classes in the image, senders-of, implementors-of, information about packages loaded in the image and so on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With