Q: What is
fluid.demands(), why do we need it, and what does it do?
Infusion includes an Inversion of Control (IoC) system, which helps developers organize dependencies between objects in their application. This makes code easier to reuse and test. Instead of directly instantiating other objects or dependencies, a component "demands" them from the Infusion IoC system. When the component is instantiated, the framework automatically sets up everything the component needs in order to operate. Dependencies are declared, or "wired up," using the
fluid.demands() framework function. More information on using
fluid.demands() can be found at Demands Specification and the .