TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To:
Date:
Tue, 14 Sep 1999 20:27:19 -0400
Reply-To:
Matthew Heaney <[log in to unmask]>
Content-type:
text/plain; charset="US-ASCII"
Subject:
From:
Matthew Heaney <[log in to unmask]>
Content-transfer-encoding:
7bit
Mime-version:
1.0
Parts/Attachments:
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.

<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

ATOM RSS1 RSS2