Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Both of these categories of Decorator have in common with each other, and also with the GoF Decorator concept, that they represent an "orthogonal" modification of the base component - that is, firstly, that they do not represent a modification of the original component contract. Going further, decorators in Infusion represent a greater orthogonality in that the same decorator may be attached to any (suitable) component, modifying its behaviour in the same way. In an OO framework this concept of "suitability" would be expressed by derivation from a common base class – since Fluid (and, fundamentally, Javascript) is not class-oriented, this is not the case here.

...

The second category of decorator is decorators to (Fluid) Renderer Components. Since Renderer Components have no behaviour and consist purely of data, the intrusion on the base contract is necessarily even lighter. Every Renderer Component has a "slot" for an array of decorators, stored at its member decorators. When it encounters this list during rendering, the Fluid Renderer will honour them by either modifying the markup or issuing a function call, in a manner appropriate to the decorator, and independent of the nature of the decorated component.

The complete list and function of these decorators is listed at Renderer Decorators.