\InstantCRUD ( Create Retrieve Update Delete)

Learn from rails - a distribution which lets you create an application with strong, non-auto-generated CRUD support (paging, sorting, optional auth, form validation with good reporting, that is easy to append to), automatic schema stuff, a pretty output (somewhat like rails default allows you), and then to "freeze" this app into a real catalyst app (generate real text files for the runtime-created components) when the user is ready to take responsibility (a start to that might be: http://lists.rawmode.org/pipermail/catalyst/2005-November/002830.html). Also likes config files over config code (xml or YAML, auto detected). See also http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-LayerCake/.

Summary of irc discussions:

  • a command line tool for generating the application files
  • command line parameters for: application name, dsn, database user and password
  • CRUD for all found database tables

An Endorsement:

Very nice, I installed apachefriends and then installed this, and by running

instantcrud.pl -name=App -dsn='dbi:mysql:dbname=test'

I had a catalyst skeleton application with create-retrieve-update-delete for the tables in the "test" database which is installed automatically by apachefriends. http://www.apachefriends.org

See Catalyst::Example::InstantCRUD at CPAN.

instantcrud.pl -name=My::App -dsn='dbi:Pg:dbname=CE' -user=zby -password='pass'

The instantcrud.pl executable creates a skeleton CRUD application in current directory. The parameters are: name of the application and database connection details.


The codebase for InstantCRUD is horrible and it uses HTML::Widget which is kind of obsoleted now by HTML::FormFu. I have already written a generator for HTML::FormFu config from a database - but currently it does not work for 'many to many' relationships. The code for inferencing 'many to many' relationships is the biggest kludge of InstantCRUD - it works but it is so ugly that I would like to get rid of it (at least partially) and I am waiting for DBIx::Class to provide a way to introspect ResultSource to get all 'many to many' relationships on it and their respective join conditions.

I am also thinking to base it on CatalystX::CRUD::Controller - but only if the author agrees for some changes in it (if anyone has other recommendations - please add them here).

My tags:
Popular tags:
Powered by Catalyst
Powered by MojoMojo Hosted by Shadowcat - Managed by Nordaaker