Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

What is fluid.demands?

Q: What is fluid.demands(), why do we need it, and what does it do?

A:
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 fluid.demands() API page.