Versions Compared

Key

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

One of the core concepts in Infusion is that Every Infusion application is structured as a set of "components." Infusion components are JavaScript objects designed to modularize functionality. In an Infusion application, just about everything is a component. The main application is itself a component that coordinates communication between subcomponents, which themselves might have subcomponents. If you're accustomed to developing with object oriented languages like Java, this will be familiar to you, but if your experience is primarily with JavaScript, this might be new – most JavaScript frameworks don't offer this level of support for object orientation.What does this mean for you? It depends what you're working on. If you're creating a single UI-widget-type-thing, your widget will likely be a component and may have several subcomponents. (The components in the infusion Component Library are created this way). An Infusion component can represent a visible component on screen, a collection of related functionality such as an "object" as in object-orientation, or simply a unit of work or relationship between other components. This page provides resources to help you understand components, how they're designed and how to work with them.

If you're creating an entire web application, your application would be implemented as a component that coordinates interactions between other components that handle the different parts of your application.

...

To help understand how a widget or application might be designed using components, consider some of the components in the Infusion Component Library:

Progress

Image RemovedImage Added
The Infusion Progress component is single component with no subcomponents. It has a number of UI elements that work together and are updated programmatically to show the progress of some activity. It has a pretty simple purpose and function, one that doesn't make much sense to try to chunk up into multiple components.

...

  • events
  • a model
  • a view
  • a renderer

While you are free to manually write code to create your components (i.e. by writing a creator function, etc), the New kinds of components are created by passing configuration information to the fluid.defaults function. This function will create the 'creator function' that will be used to instantiate the component.
The Framework provides supports for automatically creating components of various types, and we recommend that you use these supportsor 'grades'; as well, developers can create their own grades.

Next: Understanding Component Options And Their Defaults