On 27/02/2012 01:45, Karl DeSaulniers wrote:
So is the basic construct to choose between a controller or multiple
adaptors?
It seems (to me) that a combination of the two is overkill.
If you cant fit everything your trying to do within a MVC or MVA style
pattern, your coding it wrong.
Not setting flame, just inquiring. :)
Karl
I'm with you Karl.
I see models as a repository of data, modified by controllers, read by
views.
It's not necessary for controllers to have intimate knowledge of models,
all that is required is that there is some kind of interface/contract by
which a controller can read and modify the data therein. I don't see the
automatic need for any adaptor.
It may be that one model has a different interface/contract to another,
so a controller designed for one model could use an adaptor as an
intermediary to another, but that is not what I understand as the core
concept of MVC.
Views updating models? No, not at all - they are simply reflections of
the data model to the user, not something that modifies it. They only
know about the data they show to the user, they don't modify it. The
controls on a view message the controller, which may then alter the data
in the model as a result, which then causes the view to update.
MVC, in it's core is a control loop in a single direction. Control
inputs change->Controller modifies Model-> View shows updated model changes.
People embellish the core model as they wish, but really the basic MVC
pattern is simple and does not require adaptors.
There could be adaptors, there could be multiple models, there could be
views encapsulating their own mini-MVC. MVC can be extended and made
more complex, but the basic principle is very simple.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders