Pluggable views [was: Vers. 2.0 ...]

Dan Ingalls DanI at wdi.disney.com
Thu Apr 9 06:01:14 UTC 1998


jim benson <jb at speed.net> wrote...

>When you say "pluggable views" what does this mean?

Consider ListViews:  Instances of the new ListView class have a set of selectors (their "plug") that get performed to read and write the model.  Instead of a distinct ListView subclass and ListController subclass for EVERY listPane in the system, there is ONE ListView class (with controller) that gets instantiated with a different set of selectors for each listPane.

The same thing is done for TextViews and SwitchViews.  After some considerable code relocation (mainly menu actions), we get to throw away 20 or 30 classes, thus substantially simplifying the MVC world.

More to the point though, having made this change, we need only to create a handful of compatible ViewMorphs in order to run all the existing MVC models (browser, debugger, fileList, etc) unchanged in a Morphic world.  This will allow Squeak to support both UIs with very little duplication of code.

The change should facilitate any widget experiments, including native interfaces, due to reducing the number of variant ListViews to one, and likewise for the other common pane types.

	- Dan





More information about the Squeak-dev mailing list