TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Matthew Heaney <[log in to unmask]>
Reply To:
Matthew Heaney <[log in to unmask]>
Tue, 14 Sep 1999 20:27:19 -0400
text/plain (50 lines)
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.


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

<mailto:[log in to unmask]>
<mailto:[log in to unmask]>