A developer dealing with Deform has to understand a few fundamental types of objects and their relationships to one another. These types are:
The relationship between widgets, fields, and schema node objects is as follows:
Note
The Colander documentation is a resource useful to Deform developers. In particular, it details how a schema is created and used. Deform schemas are Colander schemas. The Colander documentation about how they work applies to creating Deform schemas as well.
A widget is related to one or more schema node type objects. For example, a notional “TextInputWidget” may be responsible for serializing textual data related to a schema node which has colander.String as its type into a text input control, while a notional “MappingWidget” might be responsible for serializing a colander.Mapping object into a sequence of controls. In both cases, the data type being serialized is related to the schema node type to which the widget is related.
A widget has a relationship to a schema node via a field object. A field object has a reference to both a widget and a schema node. These relationships look like this:
field object (``field``)
|
|
|----- widget object (``field.widget``)
|
|
\----- schema node object (``field.schema``)