Model View Controller and the Observer pattern

Albertina Lourenci lourenci at
Sat Aug 25 18:46:08 UTC 2001

Dear Selfers:

Something really honourable is the way the GOF strives
to make things as clear and neat as possible: to really want
to convey experience!
Since Frank Buschman believes I can implement the design
patterns in Self and since I do not see any better language to
achieve my goals I would like you to help me.
By the end of the last millennium  Jecel talked generically about
the relationships of design patterns with Self.
Now I have a very specific question and for me it is very important
it is answered in a scientifc way!!!In the excellent book written
by Alpert, Brown and Woolf entitled The Design Patterns
Smalltalk Companion 1997 to work as a complementary book
to the Design Patterns from the GOF dealing only with their
implementation in Smalltalk and related  applications, they write:
A third kind of relationships between objects in Smalltalk-80
is the ability of an object to register itself as a dependent of another

This third type, the dependency relationship used to "coordinate
activities between different objects" is the Observer pattern.
It is used to communicate between layers in an architecture.
Its best known use is in the Model-View-Controller (MVC)
framework for implementing the user interface.
As fundamental as the Observer appears to be in Smalltalk it is
not a language feature (language feature and construct is the same
thing?); it is a feature of most Smalltalk libraries. Every dialect
implements it differently. The proposed ANSI Smalltalk standard
doesn't include Observer at all. Furthermore, window painters and
other visual programming tools automate the use of Observer so
that programmers often don't use it directly anymore. Nevertheless
Observer is a significant feature in Smalltalk that Smalltalk
should understand.
The Observer pattern is implemented by the change/update protocol,
introduced in Smalltalk-80 and still used in VisualWorks today.
It is implemented in object as a combination of the subject and
observer classes. This enables any object to a subject, an observer
or both.

With change/update the dependency relationships between
objects are difficult to follow.
Then one can follow the variants and adaptations made to the
change/update protocol along the dialects of Smalltalk to make
it palatable!!!
Although the GOF inspired on the architect Alexander, indeed
Alexander is not a typical architect. I mean one that reasons
economically and with images!!!
They say they transmit experience. To be able to reach the
point of knowledge I have today it took me a year to search
for and have in my hands all the books that allow me to have
a clear idea of at least one pattern (A system of patterns,
pattern-oriented software aarchitecture Frank Buschman et al)
and of course plus a thousand of papers about the GOf, plus
tutorials  and so on!!!!
To start concluding something about how intelligible and
acceptable this experience is, I need to know how the
Self dialect deals with the same issue!!!
Of course the plenty of details is welcome if it favours
Have a fun-filled creative peaceful weekend,

More information about the Self-interest mailing list