Reading the manual:
Chapter 6, "Models," in the first section shows an example of a model
with two methods, hide() and unhide().
Chapter 18, "The Cake Blog Tutorial," Sections 9 and 11 show how to
add() and delete() posts. The methods are added to the controller.
Why are these methods in chapter 6 in the model instead of the
controller... or, vice-versa, why are the methods in chapter 18 in the
controller instead of the model?
More important than an answer to this specific comparison, I'm
interested in understanding the basic strategy or thought process that
we need to apply when making these kinds of decisions. Understanding
where different functions and bits of code are going to be put under
Cake will take me a long way.
And does my question reveal a void of understanding regarding MVC;
i.e.: is this a standard practice question or a cake question?
chris
(On a somewhat related note, my initial reaction to the Cake Blog
Tutorial when I implemented it last week was that it felt "wrong" to
use any php code whatsoever in the thtml files; I expected to see usage
of {FIELDS} inside .thtml. I'm not trying to debate anything, but I am
curious about the high-level design decisions that took place, and to
understand what makes Cake tick, the philosophy of Cake. The Basic
Concepts chapter doesn't quite go that far in depth. I'd be most
grateful to anyone willing to indulge me on this.)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---