in reply to Code Generation in Perl
I like that idea, but I've never liked having to write XML by hand. What's the benefit over an API more like:
my $project = APPML::Project->new( name => "sample", title => "Sample Application" ); my $table = $project->add_table( name => "contact", caption => "contact", descriptor => "name" ); my $vc40notnull = AppML::FieldType->new( type => "varchar", size => "40", notnull => "1", ); $table->add_fields( [ name => "name", caption => "name", type => $vc40notnull, ], [ # more fields here... ] ); $project->create();
That's the sort of interface I'd create. Maybe it's appropriate to make that write out the XML for you, but I'd personally skip the step of writing out XML, reading it in, and translating it into internal data structures.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Code Generation in Perl
by nferraz (Monk) on Jun 17, 2004 at 17:16 UTC |