As the ExtJS matures, it is constantly being accepted and used by developers. ExtJS is a complete UI framework with controls that are already well adapted to the needs of everyday development, and it is still based on HTML and styling, and is very easy to extend when unsatisfied with the special needs of requirements. Therefore, my consistent attitude is that to use ExtJS must be used thoroughly, the UI part should be fully used ExtJS to achieve, completely discard the traditional asp.net foreground mode. Of course, there are also some implementations that encapsulate ExtJS into ASP.net Server control, such as Coolite, Extaspnet.
The idea of the Extjs form Builder is created in such a context, and it is feasible to validate the actual project and obtain a good result. The basic principles of ExtJS form builder are: Define the form definition metadata (which can be XML or in a database), parse the form JSON scripts required for these metadata generation through a parser (divided into two, grid and detail forms), and then by the MVC controller, Outputs a JSON object, receives the form at the client, and makes a data query operation. The data source and data submission target for the generated form's query are described in the table cell data definition. Standard four kinds of operations:
Queryurl, the destination address of the list query.
Detailsurl, view detailed form data.
Submiturl, submit add or update data.
DeleteUrl, deletes the address of the data.
After defining these four kinds of standard, basically can satisfy the ordinary increase, delete, change, check operation. Each URL address corresponds to an MVC action.
Implementing metadata formats
The metadata includes form definitions and field definitions, and the corresponding interfaces are: Ischema and icolumn. Ischema contains Icolumn, and icolumn can be grouped (the corresponding ExtJS control is fieldset), since two interfaces inherit from the Icolumncontainer interface, corresponding class diagrams:
The source of the metadata, either an XML file or a definition in the database. Here, our default implementation is to save the metadata in an XML file.