Code Generation in Perl
[prev]
[thread]
[next]
[Date index for 2004/06/15]
Some time ago, I sent a message to the list, talking about this open
source application:
http://www.gnubis.com.br/cgi-local/crm/bin/crm.pl?template=pg_sel_contact
What I didn't tell you at the time, is that I've been working on a code
generation tool to generate a database-driven web application, like
this, in minutes.
First, you describe your application using a XML dialect called "AppML"
("Application Markup Language"):
<project name="sample" title="Sample Application">
<table name="contact" caption="contact" descriptor="name">
<field name="name" type="varchar" size="40" notnull="1"
caption="name"/>
<field name="organization" type="varchar" size="40"
caption="organization" visible="1"/>
<field name="address" type="varchar" size="40" caption="address"/>
<field name="city" type="varchar" size="40" caption="city"/>
<field name="state" type="varchar" size="40" caption="state"/>
<field name="country" type="varchar" size="40" caption="country"/>
<field name="phone" type="varchar" size="40" caption="work phone"/>
<field name="fax" type="varchar" size="40" caption="fax"/>
<field name="mobile" type="varchar" size="40" caption="mobile"/>
<field name="email" type="varchar" size="40" caption="e-mail"
visible="1"/>
<field name="notes" type="text" caption="notes"/>
</table>
</project>
That's it!
Given the XML file, a Perl script will generate the complete Perl code,
Class::DBI modules, templates, plugins, documentation and diagrams
automatically.
I'm releasing AppML under the GNU General Public License. The complete
source code is available here:
http://www.gnubis.com.br/bin/view/English/AppML
Any feedback will be appreciated!
Best wishes,
Nelson
--
Nelson Ferraz
GNU BIS
|
(message missing)
|
|
|
Code Generation in Perl
Nelson Ferraz 18:25 on 15 Jun 2004
|