Introduction
============

Background and History
----------------------

There are two main approaches taken in designing tools to generate web based forms for data systems: The "minimal approach" or the "all in one mega approach". 

Following the minimal approach the tool designer would typically write a set of functions which take field parameters as their arguments and generate HTML. Laying out the fields into usable forms is done by a view component, validating is done by a validator, getting the value into a database might be handled by an object relational mapper and the whole approcah is totally decoupled.

Following the mega approach the tool designer would create a class for each sort of field and data type it was expected the user might need. These classes would each be associated with a particular SQL data type corresponding in some way to the data to be stored in each field. Each class would also be capable of validating data and displaying an error message so the tool designer can write other tools that make it very easy for the end user to quickly write a sophisticated system for editing data in tables through a web interface. The user typically just decides which fields they need in each form and the tools take care of the rest.

The "all in one mega approach" sounds very appealing and is used in many web frameworks because it makes sophisticated form-based websites so easy to write. The drawback is that it is extremely difficult to do anything differently to the way the tool designer orginally planned because to do so requires re-writing all of the designer's code which was typically not designed to allow the end user to extend it.

FormBuild is designed to be used as the form generation part of the tools needed to implement the "minimal approach". It provides sensible ways to generate forms and plays nicely with `FormEncode <http://www.formencode.org>`_ to provide a credible alternative to the "all in one mega approach" taken by many CRUD systems. It is also highly extensible and can also be used as part of an "all in one mega approach" through the use of its builder components.