Self Addressed Stamped Envelope

CategoryPattern:


Pattern Name Self-Addressed Stamped Envelope (wiki has problems with hyphens)

Intent

Define a context-free way to notify an object of the occurrence of an event.

Also Known as

SASE (CategoryAcronym), Callback

Motivation

Sometimes you want to arrange ahead of time to have a message sent to an object whenever some 'event' occurs without having the object that triggered the 'event' know about the receiver of the message or the details of the message. For instance, in a windowing system you will often want to have an application respond to button presses or mouse clicks by having the application register a message with the button or view so that when the event occurs, the message is sent. The pattern is called SASE because of the analogy to sending a self-addressed, stamped envelope to a recipient with the understanding that the recipient will send back the envelope whenever an event occurs. For example, you may want to send a SASE to contest promoters with the understanding they will return it when the winners of the contest are known.

Applicability

Use SASE when

Participants

Collaborations

Known Uses

Related Patterns

SASE is very closely related to CommandPattern.

AmericanCulturalAssumption: In the pre-internet days you could request information from a business by sending them an empty envelope with a stamp and your address on it. They would stuff the envelope with their crud and mail it back to you.

Why is this an AmericanCulturalAssumption? In the pre-internet days I have sent SASE's (with international postage no less) from the US to the UK for similar offers. In the UK it was normally written SAE - Stamped, Addressed Envelope.


EditText of this page (last edited March 12, 2008) or FindPage with title or text search