osfameron has asked for the wisdom of the Perl Monks concerning the following question:
I've been playing with CGI using CGI.pm, and recently decided to take another step - and downloaded MySQL and the DBI module.
SQL and DBI are excellent technologies: I feel very silly for having been so afraid of them for so long - it's a conceptual hurdle from text-based queries but it's way cool:
In a lazy (I was getting bored with manually creating forms) and hubris-fully over-ambitious moment yesterday, I started to work on a CGI script that:
This is all worked better, and quicker than expected, partly because I'm also using YACM - Yet Another Cool Module - the Template-Toolkit to create the HTML form for the interface.
Now all I need to do (;->) is render the forms (with Template.pm again of course)
My problems and/or questions to you are
I imagine that I'll rewrite the code to have each widget type as a class (something like CGI::DBI::{widget} with the widget name being either an SQL datatype name like 'text', 'varchar', 'enum' etc., an HTML input type like 'SELECT', 'TEXT', 'PASSWORD', or a custom type like 'Calendar', 'Time')
Each widget would then expose methods that create the HTML table snippets to start off with. When/if I move onto generating code or validations then I can just add new methods as I go along.
Apologies if I'm thinking out loud: I'd really appreciate some insight into the process of planning this!
Cheerio!
Osfameron
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI Form builder for DBI?
by davorg (Chancellor) on Oct 30, 2001 at 16:26 UTC | |
|
Re: CGI Form builder for DBI?
by zuqif (Hermit) on Oct 30, 2001 at 16:46 UTC | |
|
Re: CGI Form builder for DBI?
by growlf (Pilgrim) on Oct 30, 2001 at 18:15 UTC | |
|
Re: CGI Form builder for DBI?
by osfameron (Hermit) on Oct 30, 2001 at 19:22 UTC | |
by Anonymous Monk on Jul 20, 2019 at 01:47 UTC |