The Model Driven Software Network

Raise your level of abstraction

In order to simplify the concept of what is a model and what we can do in a practical way, I will explain how to use a simple HTML form as a model.

 

An HTML form can provide us a simple and practical model to generate code from.

Looking to the DOM of a HTML form we can extract two main characteristics:
 - Form name;

 - Form fields;

 

Form fields by itself provide us other properties:

- type(text, password,radio, checkbox, textarea, select)

- size;

- maxlength;

 

Based upon this features we can abstract that a form looks like a entity and the form fields looks like a properties.

 more even if you have more than one form on the HTML file it can be compared to a Database Schema

 

With those premises in mind, I put inside my web tool the capability of to transform a HTML form into a common model and then generate code from it.

 

To see this approach working, please go to http://www.zumcoder.com and try to use the transformation tool (main menu->tools->transformation).

 

Just place your HTML file into the application and set the parameters:
 - model to "htmlModel"
 - select your templa set
 - set the output (mail or zip)
 - click the button "next".


Wait for your considerations.

Thanks and regards

Views: 107

Add a Comment

You need to be a member of The Model Driven Software Network to add comments!

Join The Model Driven Software Network

Comment by Adilson de Almeida Pedro on February 10, 2011 at 0:51

Gabriel,

 

Thanks for the tips

I will be glad if you send me some samples of the type of CRUD.

 

Best regards

Comment by Gabriel Ščerbák on February 9, 2011 at 22:32

Reminds me of: XML technologies, in particular XHTML forms producing XML instances of blog portal schema, which are processed using server side XSLT and stored in XML database.

 

Tip: Add links and navigation, some other templates and you could model CRUD ROA based applications.

Badge

Loading…

© 2019   Created by Mark Dalgarno.   Powered by

Badges  |  Report an Issue  |  Terms of Service