tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/773-linking-views-to-modelsRobotlegs: Discussion 2018-10-18T16:35:35Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/127156352012-01-07T10:24:44Z2012-01-07T10:24:44ZLinking Views to Models<div><p>First and foremost, RL is not really intended to be used for
such detail implementations as you describe. Shaun just wrote an
excellent explanation on another thread here:<br>
<a href=
"http://knowledge.robotlegs.org/discussions/questions/767-why-commands-are-so-slow">
http://knowledge.robotlegs.org/discussions/questions/767-why-comman...</a></p>
<p>Second: injecting models into mediators is perfectly acceptable
if you're using a presentation model pattern (which you are).
There's a direct correlation between GoombaView and GoombaModel, in
the sense that a specific GoombaModel instance holds the state of a
specific GoombaView instance. In this case the model is not an
aggregated collection of data from several sources or will not be
used for anything else than keeping state of a GoombaView instance.
In other words the view and the model are conceptually tightly
coupled anyway.</p>
<p>But as Shaun wrote in the link I gave, the application framework
should not be dragged into such low-level implementations.<br>
In your example all logic and state is split up into the various
views, mediators, commands, etc. while actually it's all view logic
and view state and shouldn't involve the framework at all.</p></div>creynders