monkey_boy has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

It seems like i often need to write Database interfaces, with a web front-end (for editing / searching / display).

I've started using Class::DBI, which is cool, and makes things easyer.

I would REALLY like to use Maypole but,

ive already spent time setting up the Class::DBI modules (which are used in other scripts).   So it seems to me that as i should be able to use these existing modules, and plug them into something like Maypole.

Does anyone have any experience on how to go about this?

(p.s. another problem is that i use oracle & can never get Maypole to work with it).

Many Thanks.

I should really do something about this apathy ... but i just cant be bothered

janitored by ybiC: Removed frowned-upon <pre> tags, fitted HTML layout/formatting.

Replies are listed 'Best First'.
Re: Database Web interface
by PodMaster (Abbot) on Sep 30, 2004 at 10:06 UTC
    Does anyone have any experience on how to go about this?
    Sure. Its not that hard, you grab yourself a CGI::Application, HTML::Template (or some such), maybe CGI::FormBuilder, maybe Data::FormValidator and you hammer it out.
    (p.s. another problem is that i use oracle & can never get Maypole to work with it).
    Got Class::DBI::Oracle installed? The wiki has info on common pitfalls

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      Cheers for the speedy responce,
      One of my main problems with Maypole (apart from not not been able to get it working), is that i dont think you should have to set up your DB Class' twice.
      (i.e. once for your Scripting API & again for the Web interface, surly this is the point of abstraction?
      Anyway, ill look into those modules, Cheers!
      P.S.
      Got Class::DBI::Oracle installed?
      Yes, but the problem seems to be with the lack of Class::DBI::Loader::Oracle

      I should really do something about this apathy ... but i just cant be bothered

        In general, you shouldn't need to set up your classes for Class::DBI and Maypole more than once. Class::DBI::Loader should read your database configuration out of the DB, or you should manually tell Class::DBI what to do. Maypole can be coaxed to avoid Class::DBI::Loader and then you can give it your existing Class::DBI setup.

        Of course you will still have to declare which tables are to be shown to the user, but that needs to be done anyway. Maybe you can fix that with some namespace walking magic, if you aren't using Class::DBI::Loader and want to export all classes/tables directly.