By: J. Doble, K. Auer
Published in: PLoPD4
Category: Smalltalk Idioms
Summary: Support for rapid development of prototypes using Smalltalk.
You're creating a class in a prototype. Other designers will add attributes to your class. Add a dictionary attribute to your class to store additional attributes against symbol keys. Provide an accessor for the dictionary. Use Artificial Accessors or Cached Extensibility
You're using Extensible Attributes. To make accessing extended attributes easier, simulate the presence of accessors for extended attributes.
You're using Extensible Attributes. To make it easier for the attributes to be functional, write a code generator that generates standard missing accessors.
You're creating a class in a prototype. Other designers will add attributes and operations to your class. Override the doesNotUnderstand: method of the delegator class to iterate through its attributes, looking for an attribute that supports the method selector that was not understood.
You're using Artificial Accessors and/or Artificial Delegation. To identify the implicit behavior and make it part of the explicit behavior of the class, override the doesNotUnderstand: method, substituting code to generate explicit methods for the virtual methods invoked the first time the implicit message is sent.
You're designing a class for a prototype. The class has state-based behavior. You expect additional states and events will be added to your class. Define states and events as symbols. For a given event/state pair, synthesize a method selector by concatenating the state and event symbols, then dispatch based on the resulting selector.