Having a single point of reference for a key means that you only need to change that key once and everything still knows what it means... it also means you don't really need to change the key - as long as it differs from other keys.
MVC is becoming a looser and looser term of reference - saying something is or is not MVC is not really that important - not as important as having something that works well and is easily extended/adapted. If it has a Model, a View and a Controller then it can be called MVC - but as Marcelo rightly points out it might not necessarily adhere strictly to the GoF MVC.
On 10/6/06, Marcelo de Moraes Serpa <[EMAIL PROTECTED]> wrote:
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
-~----------~----~----~----~------~----~------~--~---
