tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/2026-is-service-and-model-like-view-and-mediator-in-rl2Robotlegs: Discussion 2013-05-04T11:27:39Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/266942312013-05-04T03:54:41Z2013-05-04T10:04:01Zis (service and model) like (view and mediator) in RL2?<div><p>if I want to use MVC+S,Am I must create a service class and
dispatch some events to Model like view dispatch event to
Mediator?<br>
is RL2 has some interface like 'Actor' in RL1?</p>
<p>thx.</p></div>yellow.astag:robotlegs.tenderapp.com,2009-10-18:Comment/266942312013-05-04T09:00:32Z2013-05-04T09:00:32Zis (service and model) like (view and mediator) in RL2?<div><p>Hello yellow,</p>
<blockquote>
<p>s RL2 has some interface like 'Actor' in RL1?</p>
</blockquote>
<p>No, there is no Actor.as in rl2.</p>
<p>You have 2 options:</p>
<ul>
<li>
<p>Inject the shared event dispatcher into your Models and Services
like this:</p>
<p>[Inject]</p>
<p>public var dispatcher:IEventDispatcher;</p>
</li>
<li>
<p>create your own base class, inject the dispatcher, and let your
classes that need the shared event dispatcher extend it. Look at
rl1’ Actor.as for inspiration:</p>
<p><a href=
"https://github.com/robotlegs/robotlegs-framework/blob/version1/src/org/robotlegs/mvcs/Actor.as">
https://github.com/robotlegs/robotlegs-framework/blob/version1/src/...</a></p>
<p><a href=
"http://knowledge.robotlegs.org/kb/reference-mvcs-implementation/do-models-and-services-have-to-extend-actor-why">
http://knowledge.robotlegs.org/kb/reference-mvcs-implementation/do-...</a></p>
</li>
</ul>
<p>hth</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/266942312013-05-04T09:43:11Z2013-05-04T09:43:12Zis (service and model) like (view and mediator) in RL2?<div><p>thanks,<br>
I think I know how to use it now.</p></div>yellow.astag:robotlegs.tenderapp.com,2009-10-18:Comment/266942312013-05-04T11:27:39Z2013-05-04T11:27:39Zis (service and model) like (view and mediator) in RL2?<div><p>No problem:)</p></div>Ondina D.F.