This documentation is currently being moved to our new documentation site.
Please view or edit the documentation there, instead.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.
Working With Component Grades
A component "grade" is a form of type definition: a name for a particular collection of default configuration options. When defining the functionality of a component, sometimes a grade is appropriate, sometimes a subcomponent is appropriate.
When should you use grades, and when should you use subcomponents?
- If your top level component is better thought of as a collection/union of several things, use subcomponents.
- When it's a general facility you want useful throughout the component, use a grade. (Your top level component will be polluted by everything in the grade. If that's ok, then use a grade.)
The question "When to use grades, when to use subcomponents?" is similar to "When to use inheritance, when composition?" and can be answered by the same 'has a'/'is a' comparison:
- has a = subcomponents
- is a = grades