Nate,
 
>Views should never have
>direct access to models, nor should models have direct access to views.
>Any direct interaction between the two is a major violation of the
>separation of your tiers.
 
They don't. There's indeed a view reference on the controller class, but the model and the view communicate through the observer pattern: when the model gets updated, it broadcasts an event (notifyObservers), the viewer's then get notified about the change and can do whatever they want with the new data. There's not direct reference between them.
 
But as I said, there are many different MVC implementations and not all adhere strictly to the GoF blueprint and I don't think that just becouse of that they are not MVC.
 
 


 
On 10/6/06, nate <[EMAIL PROTECTED]> wrote:

> Views broadcast events to the Controller. The Controller does the associated
> action, which in turn can directly access the view via a reference or update
> the Model. The Model gets updated and then broadcast onChange event to all
> the Views that registered as listeners.

Then it must not be MVC, because if you're talking about MVC
separation, that's a very, *very* bad thing.  Views should never have
direct access to models, nor should models have direct access to views.
Any direct interaction between the two is a major violation of the
separation of your tiers.



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

Reply via email to