hi everybody,
I'm not a MVC guru,but in my opinion, the fact
that a view can import something and invoke
actions not performed by a controller, but from
a model, breaks somehow the MVC pattern.
Maybe if you need some action to manipulate data
of a model before display them, you should use
the afterfind of the model.

For example if you are handling Users, and you want
the full name with initials, but in the DB you have
name,surname and initials, you should put in after find
method something that bind together the 3 fields
and create a new key  $user['User']['fullname'].



Moreover since in your example you wrote this:

class Product extends AppModel {
     //... all attributes and methods

     function performSomeProductCalculation () {
           //perform business logic
           return $result;
     }

}

..the comment "PERFORM BUSINESS LOGIC" should immediately
let you think that something is not 100% MVC ..you are
performing LOGIC inside a MODEL, and not just model data
handling.

Anyway i don't want say that's wrong, but only that's not
100% MVC and in this way answering to your question.

Bye!!
  Andrea

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to