|
|||||||
|
Hot spots are places in component-framework systems where adaptation occurs. There are generally two types of Hot spots, depending on the type of framework in which they occur. In white-box frameworks, which consist of partially-implemented abstract components, hot spots occur at abstract methods. In black-box frameworks, where components are already implemented, while hot spots still occur at abstract methods, the person customizing the framework only cares about order of components.
There are two kinds of methods, hooks and templates. Hooks perform specific tasks on the micro-level. Templates perform tasks on the macro-level, generally calling multiple hooks. Put another way, template methods tell the program what to do; hooks tell the program how. Hot spots generally occur at the points where templates call hooks. Adaptation can occur by modifying templates to call hooks differently, or by modifying hooks to work differently. Note that a method can be at once a hook and a template. For instance, generating an invoice includes multiple steps, one of which is calculating an amount. Calculating an amount can itself take several steps. Hooks and templates can either be unified or separated. Unified hooks and templates are implemented in the same class. The only way to adapt them is through inheritance. This generally means the application must be restarted. Separated hooks and templates are implemented in different classes which can be subclassed and adapted independently; the adaptation can happen at runtime. There is also a hybrid scheme, where the template method is implemented in a descendant class of the class where the hook method is implemented. The subclass also contains a pointer to an instance of the superclass, allowing for recursive composition of templates.
Hot Spot-Driven Framework Development refers to the process of developing a framework which centers around identifying hot spots appropriate to that framework. This should be done jointly by a software engineer who is developing the framework and an expert in the field in which the framework will be used. This is an iterative process:
arudys@rice.eduLast modified: Wed Mar 20 05:28:56 CST 2002 |