Yii auto-CRUD form generation and saving (with model relations)

For an open-source project that I am working on currently, I’m developing functionality in Yii that provides centralized CRUD functionality, which generates the model forms (including related models), and saves user input using the generated forms.

The idea is that this code can be used to build a functional application with primary focus on properly building your database models (and relations), which only small tweaks hopefully needed for any form generation or saving actions :slight_smile:

Does this interest anyone else?

Note: this isn’t generated code, as per Gii, but instead centralized code with default functionality that can be overridden.

Once I feel that it is fully functional, I’ll request the community to help make it prettier, more efficient (if needed), etc.

Any thoughts, suggestions, requests?

What is the difference between ‘centraliced CRUD’ and ‘CRUD’?

Anyway, you could take a look at the gii-template-collection that adds a lot functionality to the default yii-CRUD. I would be happy to integrate your functionality in this module.

Is there some Code already available?

Hey Thyseus. While Gii is awesome (and I’m using it’s template as a basis for my code), it seems to the principles of DRY are violated.

For instance, if you have 50 models that need crud controls, you will get 50 controllers with minimal differences.

What I’ve done, is generalized the gii crud code, moved it into a central controller that can be extended.

Then the bigger part of this is the support of nested forms, dropdowns, and quick add forms to handle all relations.

Email me, I’ll show you the code. jon [at] phpsitesolutions [dot] com