Nate wrote: > On Jun 20, 10:24 am, Ian Zepp <[EMAIL PROTECTED]> wrote: >> Unlike Zend (with uses an Action suffix to designate controller >> actions), Cake doesn't have any such thing and instead uses a blacklist >> of 'private' controller actions (defined in the dispatcher). > > Here at the Cake project, we tend to prefer "simple and intuitive" > over "ugly method names" and "extra pain in the ass that I shouldn't > have to put up with". >
Wow, and I thought I was grumpy in the morning. >> As such, be aware that new methods defined in the controller could >> 'potentially' be called as an action, even if that is not the expected >> behavior. > > Yup, if they're public methods, they should be callable. If they're > private or protected methods, they should be prefixed with _. Isn't > it awesome that you don't have to be a rocket surgeon to use Cake? > As mentioned in my other post, the prefix syntax makes sense, as long as you use it consistently. As an aside and off the top of my head, the session component is an area that doesn't use it consistently: Called from line 493 @ session.php, and defined in numerous places, are __gc, __open, __close, __read, __write, and __destroy. These are all private members, and prefixed as such, but called from a public static scope. >> My firm actually uses a full-blown domain model / pattern, and uses Cake >> only for the active record layer, while the Business Logic is largely >> held in a separate layout above Cake's data access. > > Nope. See here: http://c7y.phparch.com/c/entry/1/art,mvc_and_cake While an interesting read, I don't see how that applies to my statement. The page is about combining different named actions into a single 'magic' action that auto-detects the content type and find parameters based on the request file extension. It doesn't seem to deal at all with my comment about the separation between the data access layer (where the rows are received and mapped to active record objects), the Domain Object layer (where objects are not associated to table rows), and the Mapping Gateway between them. For example, a Model is both an interface to a table, via the find methods, and a single row. I should not be able to call find on a row object. Or am I completely misunderstanding the current Cake framework? Please correct me if I am. > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---