Date:
Tue, 14 Sep 1999 20:27:19 -0400
Content-type:
text/plain; charset="US-ASCII"
Content-transfer-encoding:
7bit
Mime-version:
1.0
|
A series of articles discussing variations of the Observer pattern have been
posted to the Ada95 patterns list. They appear under "September 1999" in
the patterns archive.
<http://www.acm.org/archives/patterns.html>
All the Ada95 source code is included in the messages.
Here's a summary of the articles:
Observing a Subject's Attributes
Observe each subject attribute individually, so you know which
attribute changed when there's a notification.
Models That View Themselves
The observer is implemented as a child of the subject, so you
don't need all those pesky selector functions ("get methods")
used only by observers.
Observer Notification Using Callbacks
An less heavy alternative to deriving from a root observer type
and overriding a primitive Update operation. Here, the observer
simply registers a callback procedure with the subject.
Passing Back Data From Subject To Observer
Instead of the observer having to query the subject to get the
new value of state, the subject includes the state as part of
the notification.
Including Subject State In The Callback
As above, but the state data is included as a callback parameter.
You can subscribe to the Ada95 patterns list by sending the message (body)
subscribe patterns <your full name>
to the ACM mailing list server.
<mailto:[log in to unmask]>
You can send comments and questions to the Ada95 patterns list, or to me
directly.
<mailto:[log in to unmask]>
<mailto:[log in to unmask]>
Matt
|
|
|