News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
The Bakery:
Keeping bindModel and unbindModel out of your Controllers
December 08, 2006 @ 13:53:15

On the Bakery (the CakePHP site), there's a new entry talking about how to keep bindModel and unbindModel (create/destroy associations) out of your Controller and banishing them back to where they belong.

Here I show you how to add a simple method to your Model classes that allows your controllers to specify binds directly, in a cleaner, more proper way.

They start with a simple modification to the AppModel class before implementing the associations in another class, Title, extending the new and improved AppModel. They follow with with a clean, bindModel-free Controller that sets values and reads from the associated model data.

0 comments voice your opinion now!
cakephp framework bindmodel unbindmodel model controller cakephp framework bindmodel unbindmodel model controller



Similar Posts

Utah PHP Users Group: Model-view-controller frameworks

Developer.com: Scaffolding with CakePHP - Managing Your Fantasy Football Team

The Show: The Show Strikes Back!

Felix Geisendorfer's Blog: Bringing the cold war to CakePHP 1.2 - The Containable Behavior

RefreshinglyBlue Blog: PHP vs Ruby - Practical Language Differences


Community Events







Don't see your event here?
Let us know!


developer framework PHP5 book job releases ajax mysql cakephp release code zendframework PEAR example zend package conference database security application

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework