Dynamic CRUD

We’re very new at using Yii (or any framework for that matter).

We’ve always developed from scratch using our favorite IDE - vi - since 1986…

Our application is now browser based.

It is a medical practice management system and we have chosen Yii as the development framework for the next major release.

All of our sites utilize Linux, Apache and MySQL and have PHP5 with PDO extensions for MySQL and Oracle enabled. (and curl available…)

We currently have dynamically generated data entry forms and table listing reports based on text files we create that extend the table properties… a lot…

So, with one instance of "maintenance" code our application provides CRUD with data driven validation on any table we create without writing any code or generating any forms.

Simply by adding "StandardFileMaintenance [tablename]" to the menu table, it provides CRUD and a basic table listing report.

We plan to migrate the text files where we store the property extensions for tables into a table named extended_properties.

We are hoping that by using menu table(s) and the properties extension table that we will replace the need for a CRUD generator (and possibly other generators as well…) making the framework more data driven.

I am looking for an extension to use as a base for development so that:

  1. The extension will dynamically create full grid-edit forms from execution of DESCRIBE TABLE statements combined with reading any extended properties from a special table, if it exists vs. creating them statically using the CRUD generator in Gii. It will operate in a manner similar to the table view/edit in MS Access where you can edit columns in a row and the row is updated when the row loses focus or the user clicks on a save/update button. (i.e. it will not bring up a form to edit a single row unless requested…) The menu system will create the dynamic form by executing a function with a table name as its argument. Auto-scroll will be enabled in the form when data exceeds the available width and/or length. Page navigation will be available at the top and bottom of the editable grid.

  2. Extended column properties will be read from a special table and will be parsed for many developer designed column properties. (properties such as: order of presentation, whether to display, edit/no-edit, formatted ID’s, formatted numbers, special regexp’s like [0-9A-Z]…)

  3. The form created will have a “Default Number of Rows Per Page” to obtain, whose value is stored in a manner that connects it to the user’s login. LAN users can set the default to 0 for unlimited rows. WAN users can set it based upon their response times. The user can edit this value and have it persist for their session.

(We’re also looking to make the menu data driven as well vs. storing it in “main.php”…)

Any ideas on are greatly appreciated!

I’m trying to get CEditableGridView working on a simple MySQL zipcodes table as a starting point.

Having a bit a trouble there… No real active forum users…

I did get CodeIgniter working with dynamic CRUD based on the active table structures using Grocery_Crud.

Really want to get it all working in Yii though…