[1329] in java-interest
The need for "perform" in Java & instanc
daemon@ATHENA.MIT.EDU (Mike Christiansen)
Wed Aug 30 10:03:00 1995
To: java-interest@java.sun.com
From: mikec@metronet.com (Mike Christiansen)
Date: Sat, 30 Sep 1995 06:13:22 LOCAL
(Sorry everyone about the last post of this message to the request address :< )
I see the need for smalltalk-like perform: and perform:with: operations.
These are needed to implement several useful patterns which are found in
ParcPlace Smalltalk and in the patterns book. For example, Adaptors map the
methods value and value: to class specific methods and are used to map Views
to Models in the MVC paradigm. ValueModel's are objects which hold onto a
"value" and provide methods value and value: as "getter" and "setter" methods.
Most of the Smalltalk widgets and other types of views expect that the model
they are presenting will respond to ValueModel methods to provide a value to
present. The Adaptor allows models which do not support this protocol to be
presented by such views.
In fact this begs the larger question of how instance specific behavior
is to be implemented in Java. Each instance of an Adaptor is initialized with
its model object and the symbol names of the methods used to accessthe model's
value. Creating a new subclass of Adaptor for every neededpurpose would cause
hundreds of classes to be created.
Any comments?
Thanks,
Mike.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com