Last updated at 4:02 am UTC on 26 February 2005
Reported by Alexandre Bergel (ab)
What problem is being addressed
Classboxes address the two problems:
- Preserving expected behavior of library/app existing when installing new application. Original behavior might be impacted (1) if the loaded application defines classes that have already existing name, and (2) if the loaded application redefine some method in a wrong way.
- Conflicting class extension
How it solves the problem
By making definitions contained in a classbox visible only to the classbox that defines it and other classboxes that import the extended classes from it. Let's assume a classbox Network that extends the class String with a method asUrl. This method asUrl is visible only in the classbox Network, and not outside. A classbox WebBrowser would import String from Network to send message asUrl to instance of String.
For coherence I think the author should write the sections above this line.
People can add what they want to these later sections, and can suggest that the author change the rest.
What's cool about it
Classboxes are more powerful that Selector Namespaces in the sense that new extension can be called by former code. Such a property is not satisfied with Selector Namespace. a picture that illustrates it.
Read the paper http://www.iam.unibe.ch/~scg/Archive/Papers/Berg05aclassboxes.pdf to know more about comparision with other systems.
Back to New Modules