I'm unsure which way my application should operate when it comes to View <-> Model.
Should my View Controller/Class ask for the page variables from the Model, or should the Model feed them to the View?
E.g.:
Code: Select all
$model = new Model(new View);Code: Select all
$view = new View(new Model);Code: Select all
interface iView
{
public function assignVariable ($var, $val);
public function setTemplate ($template);
}Code: Select all
interface iModel
{
public function getTemplate ();
public function getVariables ();
}It works, but it's bugging me.. I like uniformity but also I like to meld with 'the norm', and as I need to revamp one of my projects this would be an ideal time to make this change, however being as indecisive as I am.. what do you guys think?