I'd define the following basic crud operations operations in appController to work generically independant of controller/model:
add(), edit(), del(), view() admin_add(), admin_edit(), admin_del(), admin_view() Then, all your profile controllers would inherit from appController, and: delete_quote, new_quote functions would become /quotes/del, /quotes/ add update_authors would become authors/edit update_artists would become artists/edit ... but you wouldn't need to build these crud operations separately into each controller. You would still need different view files for each controller obviously. Often times I find there are controllers which are only there for their crud operations. In that case, I would want to take things a step further and create a generic crud controller, which works with any model and performs crud operations on it, then eliminate the other "crud-only" controllers. I haven't done this yet, because it would mean storing all the view files in a views/cruds/ folder, named edit_authors, edit_quotes and the like. Then would have to do a $this->render('edit_'.$controller); in the crud controller. This is somewhat of a departure from the way things are done in cake, so I am still mulling it over. But since I have generic crud functions in my app controller, it drives me crazy having all these empty controllers hanging around just for inheriting the crud ops. ... now if only cake was smart enough to create a controller if we don't supply one (the way I understand it does with models), that would solve the problem. How do other people deal with the issue of controllers whose only raison d'etre is their crud operations? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---