BTW Ross, I thought your example was great.
On Feb 26, 2012, at 9:51 PM, Karl DeSaulniers wrote:
I have not created any MVC (I don't think) per se, so I am no
authoritarian by any means.
It just seems that when coding a paradigm, you want to keep it
simple as possible so as to not confuse yourself or the paradigm.
I would tend to agree that a controller should do just that...
control.
a view should be used to display and to send updates back to the
controller depending on the user interaction.
the model just sits there and gives and takes data, formating it for
the view maybe or sending back errors for the controller.
I think that if your model is as simple and streamlined as possible,
it makes the job of the controller and view much easier.
the controller is definitely the hardest worker of the three.
I think also, that if you make your model aware of the others, it
tends to start memory leaks.
a plague of most smart phone apps and flash websites today.
Kind of like a production artist trying to do art direction without
telling the art director. Gets kinda messy.
It can be done, but you may end up refunding the client.
Open for thoughts..
Best,
Karl
On Feb 26, 2012, at 8:36 PM, Paul Andrews wrote:
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
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders