/src_docs/architecture/comp/overview.html, v125
Form Model Requirements
This is something of a legacy document - it describes the initial set of
requirements for the Barracuda Form Mapping & Validation layer, and may be
helpful in understanding the underlying philosophy which drove subsequent
design/implementation decisions.
- 4 main entities:
- FormMap
- FormElement
- FormValidator
- ValidationExceptions
- Form Maps
- can contain any number of Form Elements
- may be associated with any number of form validators
- allow for easy retrieval of form element values in their
designated type
- automatically maps HttpRequest String params to FormElements
objects within the form map
- automatically validates a form and all its elements by invoking
all associated validators
- Form Elements
- support types String, Integer, Boolean, Date, Long, Short,
Double, Float
- track key, type, orig val, mapped val, validators
- also track whether or not an element is required in the form
- also track whether or not there may be multiple values for an
element in the form (map to a List of proper types)
- allow for easy retrieval of form element values in their
designated type
- may be associated with a form validators
- Form Validators
- can be associated with a Form or individual elements in a form
- able to contain other Validators (allowing you to associate
multiple validations with a given form/element)
- create a suite of reusable validators for common validation
needs
- ValidationExceptions
- provide the ability to nest validation exceptions
- allow for different validation strategies: stop on first err, or
attempt all validations and collect a list of errors
Last Modified: 2006-01-02 15:59:13 -0500 (Mon, 02 Jan 2006)