tag:robotlegs.tenderapp.com,2009-10-18:/discussions/suggestions/16-on-vew-mediatorsRobotlegs: Discussion 2018-10-18T16:35:10Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/14047892010-04-08T20:12:53Z2010-04-08T20:12:53ZOn Vew Mediators<div><p>Hi Dmitry,</p>
<p>That's a good idea, but I see a couple of problems with that
approach:</p>
<ol>
<li>
<p>We'd still need to do the mappings somewhere in order to process
the Mediator/Model (to inspect its metadata), so at very best it
would just shorten the mappings:
<code>mediatorMap.mapView(SomeMediator);</code></p>
</li>
<li>
<p>It's far less flexible: the point of Inversion of Control is to
remove those kinds of configuration decisions from inside our
business classes and place them in a more sensible place. The
SimpleModel, for example, would only be able to be used in the
particular context that it has now been hard-coded into.</p>
</li>
</ol>
<p>Classes shouldn't know (or care) how they are going to be used,
it is not part of their job. The decision as to whether a class
should be a singleton or not should be left up to the container (or
application).</p></div>Shaun Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/14047892010-08-16T11:07:41Z2010-08-16T11:07:41ZOn Vew Mediators<div><p>I'm with Shaun</p></div>Nikos