Action - you're perfectly OK. I have one warning: don't get too crazy with having a "generic" controller controlling many models, it can get out of hand very quickly if you're not careful. I speak from experience, having rewritten this week a clients_controller that had grown to over 1000 lines of code, and was managing way too many models for it to make sense anymore. The methodNamesWereGettingVeryLong!
The nice thing about cake is if it comes to a point where you need a separate controller, you can bake one up and view very quickly. -Chad On Nov 9, 3:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > This is quite common practice. You will often have far more models > than controllers, for example you may not need a TagController to go > with a Tag model which is related to a Post model, and managed through > the post/edit action. > > When it doesn't make sense to edit a related record in issolation, I > wouldn't bother with a controller for it. > > simon > > On Nov 9, 9:53 pm, Action <[EMAIL PROTECTED]> wrote: > > > My application currently has 2 associated tables: Posts and Comments. > > > A post hasMany Comments and each Comment belongsTo a Post. > > > So, the only purpose of the Comments model is to be associated with > > the Posts model. I have no use for a Comments controller or view. Any > > data saved/retrieved from the Comments model is done using the Posts > > controller and is displayed in the appropriate Post view. > > > Is having just a model without any view or controller like this > > considered practice? If so, how should I redesign my application? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
