Versions Compared

Key

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

...

Events in Infusion are model-oriented, and aren't specific to the DOM. Events have a very plain implementation in Infusion —  an event here is really just another kind of function call. Any function signature can be an event signature, any function can be an event listener, and an event's fire method is a plain function handle that can be handed around just like any other function. There is no special kind of "Event Object" that gets handed around to event listeners, and anyone can easily define a new event by simply calling fluid.makeEventFirer(). In practice, users should use the events which are created automatically by the framework as part of the initialisation of every Evented Component. Just by writing the event name in a component's options structure, an event type is automatically created. No code required.

...

Infusion has a clear concept of a view: the ViewComponent. As mentioned above, models are central to the framework as well, represented by the ModelComponent grade - every ViewComponent is automatically a ModelComponent also. The overall design of Fluid is aimed to reduce to zero the code at the controller level of an application. Instead, Infusion emphasizes declarative configuration, the powerful and flexible Events system, and the automated approach to data binding enabled by the EL system and the ChangeApplier.

...

IoC is a crucial mechanism of avoiding tight binding between framework components in Infusion. Whilst we do not yet have a full formal IoC container in the framework, most of the essential mechanisms are already there as part of Infusion's Component system. The subcomponents for a top-level component can be expressed in a declarative structure, where a tight binding is avoided between component and subcomponent implementations. This enables a more flexible design, including the ability to swap out the implementation of one subcomponent for another. We accomplish this loose-coupling through the use of EL to hold the name of the subcomponent to be instantiated, rather than requiring the user to instantiate the subcomponent themselves directly in code.

...