I've been fooling around with this idea for the last couple of days and I was wondering if I could get some feedback from the list.
Basically, what I've got working right now is a subclass of Loader, which creates all the RDBO .pm files (obviously), as well as RHTMLO 'stubs' that contain all the columns in in the RDBO files. The types are all wrong (just using $class->type at the moment). It's only marginally useful at the moment, but with a simple RDBO type to RHTMLO type hash, it'll require a whole lot more useful. http://kabob.ca/perl/FormMaker.pm usage like: my $loader = Rose::DB::Object::Loader::FormMaker->new( db_dsn => 'dbi:mysql:dbname=acp;host=localhost', db_username => 'user', db_password => 'password', db_options => { AutoCommit => 1, ChopBlanks => 1 }, class_prefix => 'Something::DB::', form_prefix => 'Something::Form::', ); $loader->make_modules(module_dir => 'Dump'); As you can probably see, i've added 'form_prefix', which is the prefix that'll be used for the Form Classes, should you wish to have it differ from the RDBO classes (and you'd better, since right now it's stupid and will just overwrite your RDBO files with the RHTMLO ones) Anyway, comments and criticism would be appreciated. Adam Quoting [EMAIL PROTECTED]: >> >> I find myself needing to bootstrap a bunch of Rose-based apps. Ideally, I'd >> like to be able to run a script like: >> >> make_rose_garden.pl --db db_name --host some.where --prefix MyGarden >> >> and I would get RDBO .pm files, RHTMLO .pm files and some >> integrated validation >> glue, all generated for me under the MyGarden:: prefix. Then I >> could edit the >> form classes (or maybe even a .yml config file) to adjust the field labels. >> Maybe even some .tt stock templates to render my forms in a sane way. Maybe >> even a --catalyst option to generate the required ::Controller and ::Model >> classes for me. >> >> So I'm going to dive in and work on such a thing. In the Rose::DBx::Garden >> namespace. >> >> Thoughts? Comments? > > I'd love to see something like this integrated with (or extending) > RDBO::Loader. So if I were to 'make_garden', it'd spit out everything > you're talking about. It seems to me that Loader would be an obvious > place to start. You could then further subclass that to offer more > customizations (like catalyst stubs). > > Adam ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object