|
Metastorage generates form handling classes
Manuel Lemos, 2003-07-10 09:00:00 GMT
In the continuation of the work to achieve further reduction of
application development efforts, the new release of Metastorage is now
capable of generating automatically classes that are able to handle Web
forms that serve as user interface to create new persistent objects.
Automatic form generation is an important feature that may increase
significantly the productivity of software developers, especially of large
projects.
The form handling classes generated by Metastorage realize operations with
many details that would be tedious and take too much time to code manually,
especially when compared with just a few seconds that may take Metastorage
to generate it.
The developers only have to specify a few details of the forms that they
want to be generated. Metastorage generates optimized classes with distinct
functions to initialize, process and output the forms, following the
Model-View-Controller
(MVC) aggregate design pattern.
The generated form handling classes may present the Web forms to the user
with fields that correspond to the variables of the class of which it is
meant to create a new object.
The forms layout may be generated automatically by Metastorage from one
of the pre-defined types of layout. Alternatively, the developer may
specify his own layout template. A template consists of a simple
HTML file with special marks that define place holders for the form fields,
their labels and eventual form messages.
Additionally, the generated forms may be wrapped around presentation
skins that involve the form area to provide a consistent look and feel.
The developer may specify his own presentation skins or use one of the
pre-defined that are provided with Metastorage.
Skins and other presentation settings may be grouped in common theme
definitions. Metastorage provides several pre-defined themes that
provide the look and feel of graphical user interfaces of familiar desktop
operating systems.
Some example screen shots are available to
show the different types of pre-defined presentation themes that are
provided. More presentation themes will be made available later. Themes
contributed by Metastorage users are also welcome.
Metastorage combines the form layout template with the skin template and
compiles everything into the code of the generated form handling classes.
Therefore, the forms output is generated at run time at top speed due
to this early template compilation.
The forms are processed by a forms generation and
validation class that is called by the class generated by Metastorage.
This class validates the submitted form fields to ensure that the
respective variable values satisfy the validation rules specified in the
Metastorage component definition.
The forms class also takes care of combining the form HTML data with
Javascript code that is automatically generated to do client side
validation, thus avoiding additional form submission round trips.
If all goes well, the class generated by Metastorage creates a new object
of the specified component class. Then it stores the values taken from the
submitted form in the respective class variables. Finally it stores the
object in the persistent store (i.e. a new database table row). The class
may also perform additional validation to verify the consistence of the new
object values.
The UML class diagrams produced by
Metastorage now also include the generated form handling classes for a
better view of the component classes.
Following these developments, Metastorage will also be capable to generate
forms to search, edit or delete previously stored objects. For
complex objects, there will also be the possibility to split the variable
fields between multiple form pages, with additional buttons to
navigate between the different pages.
For the current release, the documentation has been enhanced to explain
how to use the generated
code. Soon, it will be made available a step by step tutorial to
make it easier to get started using Metastorage to develop real world
projects.
More details about Metastorage are now explained in the
Frequently Asked Questions page. |
|