Overview
|
Infusion provides easy ways to make your UI code more configurable and customizable. This declarative approach also provides simple lightweight Inversion of Control (IoC), allowing you to write really loosely-coupled and configurable code. |
Each Fluid component, by the Fluid Component API, includes a standard options structure at its top-level, entitled options. This is a largely free-form structure (except for a few mandated elements) which holds configuration for the particular component instance. Examples of configuration options include element selectors, event listeners, and other settings for the component. Each component provides a set of default options out of the box, and users can override these defaults with their own choices.
A key task for the framework is to merge the component's defaults with the options specified by the user at runtime. Default options for a component are registered by the component developer using the fluid.defaults() function. The framework combines these values with those supplied by the user to the component creator function. For information about how this is accomplished, see Options Merging for Fluid Components.