RSS Feed for This PostCurrent Article

How I develop a database driven web application in 2 days

Throughout the years as a developer, I had programmed for quite a number of business applications. All the business web applications, be it in Java, .NET, or PHP.. need to access or database, whether it is Oracle, MySQL, or SQL Server…

Then as when I was doing coding for one of the projects, which had about 40 reference/lookup tables, I tried to search if there is any tool that can help to do the normal CRUD for those tables.

I found several tools but at the end I chose OpenToro. OpenToro is a Web Database Publisher, a tool that allows us developing database-driven web applications in an agile and automatic way.

OpenToro can help in

  • Listing Database Tables.
  • Visualizing Records.
  • Generating Forms for inserting, modifying and deleting records.
  • Database tables managing.

OpenToro manages database tables using XML metada. Here is an example of metadata file for a table called ‘SCOPES’ that have two fields: ‘CodScope’ and ‘Name’.

<?xml version="1.0" encoding="ISO-8859-1"?>
<MetaData>
<TableDescription>
<TableGeneral>
<TableName>SCOPES</TableName>
<TableDesc>SCOPES</TableDesc>
<TableIndexField>CODSCOPE</TableIndexField>
</TableGeneral>
<FieldsDesc>
<FieldDesc>
<FieldName>CODSCOPE</FieldName>
<FieldAlias/>
<FieldDescription>CODSCOPE</FieldDescription>
<FieldType>num</FieldType>
<!--FieldReference codMetaview=""></FieldReference-->
<FieldRequired>S</FieldRequired>
<FieldLength>6</FieldLength>
</FieldDesc>
<FieldDesc>
<FieldName>NAME</FieldName>
<FieldAlias/>
<FieldDescription>NAME</FieldDescription>
<FieldType>text</FieldType>
<!--FieldReference codMetaview=""></FieldReference-->
<FieldRequired>S</FieldRequired>
<FieldLength>100</FieldLength>
</FieldDesc>
</FieldsDesc>
</TableDescription>
<MetaViews>
<MetaView cod="100">
<MetaViewGeneral>
<MvDescription>SCOPES</MvDescription>
<MvTitle>SCOPES</MvTitle>
<MvType/>
<MvOrderField orderType="ASC">CODSCOPE</MvOrderField>
<MvComboField>CODSCOPE</MvComboField>
<MvGroupByExpr/>
</MetaViewGeneral>
<MetaViewList>
<Field>CODSCOPE</Field>
<Field>NAME</Field>
</MetaViewList>
<MetaViewRecord>
<Field>CODSCOPE</Field>
<Field>NAME</Field>
</MetaViewRecord>
<MetaViewForm>
<Field>CODSCOPE</Field>
<Field>NAME</Field>
</MetaViewForm>
</MetaView>
</MetaViews>
</MetaData>

The OpenToro architecture is componed by 3 sub-architectures:

  1. A Model 2 architecture for managing the user requests and generating responses. This is the Web Application.
  2. A Pipeline architecture for generating contents (XML based). These contents are transformated by XSLT, generating finally HTML.
  3. A Reflective architecture for managing the content’s tables.

OpenToro makes trivial generating listing of database’s tables, visualizing records contents and making forms for database’s tables.

At first day I was trying to understand how OpenToro works, and tried to configure it against my first database table. Once I got pass the first hurdle, the rest is a snap, and I was able to complete my application in 2 days time.


Trackback URL


RSS Feed for This Post1 Comment(s)

  1. Marcos | Nov 16, 2007 | Reply

    Hi. I’m Marcos Boza, one of the Opentoro developers. Congratulations, and thanks for your post.

    Regards!

Sorry, comments for this entry are closed at this time.