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

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii auto-CRUD form generation and saving (with model relations) Rate Topic: ***** 1 Votes

#1 User is offline   intel352 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 196
  • Joined: 05-February 10
  • Location:Southport, NC

Posted 04 June 2010 - 04:32 PM

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 :-)

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?
Need live Yii support? - Join the #yii IRC channel on Freenode!
0

#2 User is offline   thyseus 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 300
  • Joined: 18-April 09
  • Location:Leipzig, Germany

Posted 07 June 2010 - 06:44 AM

View Postintel352, on 04 June 2010 - 04:32 PM, said:


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?
0

#3 User is offline   intel352 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 196
  • Joined: 05-February 10
  • Location:Southport, NC

Posted 07 June 2010 - 08:35 AM

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
Need live Yii support? - Join the #yii IRC channel on Freenode!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users