Wonder what Webmin uses. It has a decent, generalized database interface, 
many admin tasks and CRUD.
__________________________________________
Ranga Nathan / CSG
Systems Programmer - Specialist; Technical Services; 
BAX Global Inc. Irvine-California
Tel: 714-442-7591   Fax: 714-442-2840




"Alex Aminoff" <[EMAIL PROTECTED]> 

Sent by: [EMAIL PROTECTED]
07/27/2005 07:03 AM

To
"Simon Wilcox" <[EMAIL PROTECTED]>
cc
[email protected]
Subject
Re: [Boston.pm] Is there a module that automates a web interface to     a 
DB?







Thank you for these pointers. On my own I found only the tip of the 
iceberg;
CPAN has grown since I first used it 10 years ago :)

My head is now swimming from reading the perldoc of all these modules.
However, I cannot seem to find what I want, which is an automatic HTML 
form
generator (and something that subsequently does updates based on the
CGI->param's passed back) that lets you edit all the rows of a table (or a
slice of a table) at the same time. Maypole, for example, whose
documentation on this seems the clearest, has a "list" method that 
produces
a list of records, but to edit each record you have to hit an edit button
which takes you to a different screen. This is not what I want. I want all
or some of the fields in the list to be editable widgets. Since there is 
no
hierarchical structure to $CGI->param's, this means that the module would
have to encode the primary key of the row into the name of the parameter 
so
you know which row to update, and the update function would have to know 
how
to decode that.

I'm not finding any module that seems to do this. I can sort of understand
why: once you start thinking in terms of Class::DBI, each row is an 
object,
so it's very natural to want to do things to only one object at a time.
OTOH, if you find HTML::Template's <TMPL_LOOP> concept intuitive, then you
can immediately see why you would want what I want.

 - Alex


----- Original Message ----- 
From: "Simon Wilcox" <[EMAIL PROTECTED]>
To: "Alex Aminoff" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Tuesday, July 26, 2005 12:05 PM
Subject: Re: [Boston.pm] Is there a module that automates a web interface 
to
a DB?


> On Tue, 26 Jul 2005, Alex Aminoff wrote:
>
> > I recently did a web interface to a database. I found myself writing
some
> > code that seemed general-purpose. I'm wondering if I reinvented the
wheel.
>
> I think you probably did but that's ok, everyone does :-)
>
> > What I want is, when generating the web form, to automatically 
generate
a
> > hash with all the tables and fields represented both as the data 
values
> > and as html snippets that produce an appropriate input field with an
> > appropriate default. Somthing like
>
> Maypole probably does everything that you want in a simple CRUD
> application : http://search.cpan.org/~teejay/Maypole-2.10/
>
> Or Catalyst if you need something more flexible:
>
> http://search.cpan.org/~mramberg/Catalyst-5.30/
>
> Or roll your own using a combination of these modules:
>
> Class::DBI::AutoLoader
> Class::DBI::AsForm
> Class::DBI::FromForm
> Data::FormValidator
> CGI::Application
>
> There are *loads* of modules on the CPAN to help with these tasks.
>
> Simon.
>

 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm


 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to