tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/353-mediator-cant-hear-an-eventRobotlegs: Discussion 2012-05-16T12:49:08Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/88047882011-07-29T07:49:04Z2011-07-29T07:49:04ZMediator can't hear an Event<div><p>Oh, that’s great, Tim! I’ll take a look at it and
get back to you later today.<br>
Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/88047882011-07-29T17:05:57Z2011-07-29T17:05:57ZMediator can't hear an Event<div><p>That was a lot of work, Tim!! And you were fast!</p>
<blockquote>I'm not sure whether it's right, and I'm no UML expert
(actually, I find it hard to display event driven activity in UML
sequence diagrams).</blockquote>
<p>I'm no UML expert either :) I know it’s not easy to make
such a sequence diagram.<br>
I thought it would be more suited to show the 3 major
areas/regions/scopes of an RL-Flex application:</p>
<ul>
<li>
<p>RobotlegsInternals as a framework ( Context, MediatorMap,
MediatorBase - of interest to us in our example)</p>
</li>
<li>
<p>RobotlegsImplementation (ApplicationContext, Commands, Models,
Services and Mediators)</p>
</li>
<li>
<p>FlexComponents (View: ContextView- Application and a SomeView-
child component)</p>
</li>
</ul>
<p>If you think that another type of diagram would be easier to
use, or would be more clear, I’d be the last one to complain
about it :) Or if you have another tool, that would facilitate the
visual representation, go on and use it. Our goal isn’t to
present UML best practices, is it?</p>
<p>I’m not sure which name would be self-explanatory for the
3 areas. RL-Internal, RL-Implementation, Flex-Components... or flex
what?<br>
Let’s say we’ll agree upon a better naming later on,
but for now I think it’s important to know, if having only 3
sequence instances/areas/bounderies would be better than having an
instance for every class dispatching an event.</p>
<blockquote>There are some nebulous areas like when AnotherView's
creationComplete is triggered by the LayoutManager, but I don't
think we need a microscope that powerful. The focus is primarily
component and application initialization in Flex and how it relates
to RL bootstrapping.</blockquote>
<p>Exactly, none would benefit from too many details. And we really
should try to keep the focus on RL + Flex only.</p>
<p>I’ll use your diagram to see how it could be simplified
and I’ll think about an easier way to represent the flow,
while keeping the instances in 3 groups. I will keep you posted
about any progress or new ideas, but it will happen slowly.
I’m very sorry about that, but<br>
hopefully my slow steps won’t be a problem for you.</p>
<p>Thank you for your work and ideas :)</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/88047882011-07-29T18:57:58Z2011-07-29T18:57:58ZMediator can't hear an Event<div><p>Hi Ondina,</p>
<blockquote>
<p>I'm no UML expert either :) I know it’s not easy to make
such a sequence diagram. I thought it would be more suited to show
the 3 major areas/regions/scopes of an RL-</p>
<p>Flex application:</p>
<ul>
<li>
<p>RobotlegsInternals as a framework ( Context, MediatorMap,
MediatorBase - of interest to us in our example)</p>
</li>
<li>
<p>RobotlegsImplementation (ApplicationContext, Commands, Models,
Services and Mediators)</p>
</li>
<li>
<p>FlexComponents (View: ContextView- Application and a SomeView-
child component)</p>
</li>
</ul>
</blockquote>
<p>I agree, I have mixed feelings about UML in general, some of it
could be useful, some of it less intuitive. I'm wondering whether a
sequence diagram serves this purpose well, or whether it might be
better to break this diagram into more manageable chunks, perhaps
of different type. I think sequence diagrams start to reach a point
of diminishing return once they exceed a certain level of detail.
The challenge it seems is to show the three areas you outlined
above in a clear manner, while illustrating sequence of Flex
framework events, RobotlegsImplementation/Project custom events,
and RobotlegsInternals events.</p>
<blockquote>
<p>I’m not sure which name would be self-explanatory for the
3 areas. RL-Internal, RL-Implementation, Flex-Components... or flex
what?</p>
</blockquote>
<p>I think that works. Flex-Component is closely related to
Flex-Application, since Flex-Application extends a Flex-Component
and adds additional functionality. So it could be
Flex-Component/Application.</p>
<blockquote>
<p>I think it’s important to know, if having only 3 sequence
instances/areas/bounderies would be better than having an instance
for every class dispatching an event.</p>
</blockquote>
<p>Do you mean reduce the number of detail?</p>
<blockquote>
<p>I’ll use your diagram to see how it could be simplified
and I’ll think about an easier way to represent the flow,
while keeping the instances in 3 groups. I will keep you posted
about any progress or new ideas, but it will happen slowly.
I’m very sorry about that, but hopefully my slow steps
won’t be a problem for you.</p>
</blockquote>
<p>I look forward to it. Speed is not a requirement here, only
clarity is.</p>
<blockquote>
<p>Thank you for your work and ideas :)</p>
</blockquote>
<p>Thank you for taking the time and creating several illustrative
projects that started it all.</p>
<p>Tim</p></div>Timurtag:robotlegs.tenderapp.com,2009-10-18:Comment/88047882011-07-30T09:49:41Z2011-07-30T09:49:41ZMediator can't hear an Event<div><p>Tim,</p>
<blockquote>I'm wondering whether a sequence diagram serves this
purpose well, or whether it might be better to break this diagram
into more manageable chunks, perhaps of different type. I think
sequence diagrams start to reach a point of diminishing return once
they exceed a certain level of detail. The challenge it seems is to
show the three areas you outlined above in a clear manner, while
illustrating sequence of Flex framework events,
RobotlegsImplementation/Project custom events, and
RobotlegsInternals events.</blockquote>
<p>You are so right! Sequence Diagram is definitively not suited to
our needs, or simply because we are no-uml-experts ;) And yes, it
might be better to break this diagram into more manageable
chunks.</p>
<blockquote>I think that works. Flex-Component is closely related
to Flex-Application, since Flex-Application extends a
Flex-Component and adds additional functionality. So it could be
Flex-Component/Application.</blockquote>
<p>Ok, then I’ll go with FlexComponents (Application and
ChildComponent) , RobotlegsInternal, RobotlegsImplementation</p>
<blockquote>Do you mean reduce the number of detail?</blockquote>
<p>Yep. Less details, more clarity :)</p>
<p>I’m starting now with a diagram by using only the traces
related to the ContextView.<br>
Till then...</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/88047882011-07-31T11:13:46Z2011-07-31T11:13:46ZMediator can't hear an Event<div><p>Update:</p>
<p>It's cold and rainy outside, so I spent some time playing with
diagrams ;)<br>
RLStartupSequence_01.png was the first one I made, then
RLStartupSequence_02.png and the last one is
RLContextViewFlow_01.png<br>
None of them is complete or nice or clear enough. I also
didn’t check if the flow is absolutely correct. I also
misused the Sequence Diagram’s elements and so on. Anyway I
wanted to let you see them, so you can better understand what I was
talking about, when I mentioned the 3 areas of interest. I used
Swimlanes(FlexComponents, RLInternal,RLImplementation) and
Lifelines(ContextView, ApplicationContext etc)</p>
<p>RLContextViewFlow_01 shows only the flow for the ContextView +
ApplicationMediator + service call. I think we should have more
than one diagram. One for the ContextView, one for SomeView and one
with both ContextView and SomeView flows, with fewer details than
in the first ones. Then we could have variations of the combined
flow for the different scenarios (service call on startupcomplete,
on applicationcomplete, from onregister of the mediator...) if we
want to.</p>
<p>After taking a closer look at the trace statements, I saw that
their order of execution isn’t correct in my code. For
example I put trace("[MediatorMap] createMediatorUsing()
"+viewComponent+ " "+mediator); in createMediatorUsing after it
calls registerMediator(), so registerMediator appears first.
I’m sorry for that. My excuse: I made changes to the code in
kind of a hurry, between different other tasks and formulating an
answer for our discussion.</p>
<p>So Tim, I hope my ugly diagrams are at least illustrating my
point. I’ll try to see if I can reduce the number of details
even more without loosing valuable information.</p>
<p>Ondina</p></div>Ondina D.F.tag:robotlegs.tenderapp.com,2009-10-18:Comment/88047882011-08-01T00:19:32Z2011-08-01T00:19:32ZMediator can't hear an Event<div><p>Hi Ondina,</p>
<blockquote>
<p>I wanted to let you see them, so you can better understand what
I was talking about, when I mentioned the 3 areas of interest. I
used Swimlanes (FlexComponents, RLInternal,RLImplementation) and
Lifelines (ContextView, ApplicationContext etc)</p>
</blockquote>
<p>I think the Swimlanes idea is brilliant. I'm poring over the
ContextView Flow now. I like how you have color coded different
areas and have assigned different shapes to events, etc. Here are
my thoughts/questions/suggestions:</p>
<ul>
<li>
<p>Do you think it would make sense to somehow differentiate the
ContextEvent.STARTUP chevron visually? I'm thinking that the other
events are triggered by either Flex Components or by RL Internals,
whereas ContextEvent.STARTUP is a rather arbitrary event and could
be confused in this diagram for a "system" level event.</p>
</li>
<li>
<p>Would it be slightly less confusing, do you think, to lower the
ContextEvent.STARTUP chevron so that it would not be parallel (on
the same Lifeline) with the mapInjections in the rightmost
swimlane? I don't think they are related, but being parallel in the
diagram makes you associate them. I've attached a small mockup of
what I mean.</p>
</li>
<li>
<p>Another question I have is related to the
MapView.registerMediator()->MediatorBase.preRegister()->MediatorBase.onRegister()
where ApplicationMediator.onRegister()->super() would call the
same MediatorBase.onRegister(). It's not yet clear to me how this
works since visually the linear continuity is interrupted.</p>
</li>
<li>
<p>Should we show the SomeModelEvent.DATA_UPDATED chevron for
completeness' sake, or do you think it's unnecessary?</p>
</li>
<li>
<p>In my version of Startup_Takethree project, I have
MapViewsCommand dispatch ContextEvent.STARTUP_COMPLETE that really
does nothing. It is the onApplicationComplete handler that triggers
the SomeServiceRequest. I mention this because you have a commented
out line of code:</p>
<p>//commandMap.mapEvent(ContextEvent.STARTUP,
SomeServiceRequestCommand, ContextEvent, true); //won't work</p>
</li>
</ul>
<p>And I'm wondering whether we are showing a flow that won't
work.</p>
<ul>
<li>And lastly, do you think SomeModel.setData() belongs in the
Flex Components swimlane? It's tough to place the model here.</li>
</ul>
<p>That's all I can think of for now on the ContextView Flow.
Thanks again, Ondina, for doing an excellent job of it. I will now
look over the other two diagrams.</p>
<p>Tim</p></div>Timurtag:robotlegs.tenderapp.com,2009-10-18:Comment/88047882011-08-01T13:32:05Z2011-08-01T13:32:05ZMediator can't hear an Event<div><p>Hi Tim,</p>
<p>I’ll open a new thread under [Examples], because I think
that our current discussion is a little outside the scope of this
thread. Your initial question has been answered.</p>
<p>Our goal now is to find the best way to explain the start-up
process in a Flex-RL application through:</p>
<ul>
<li>
<p>code</p>
</li>
<li>
<p>diagrams</p>
</li>
<li>
<p>explanations</p>
</li>
</ul>
<p>I wasn’t sure where to put it. What category does it
belong to? It’s not a solution yet, it’s not a problem
or question, so I decided to put it under [Examples], because we
will have one sooner or later. I also don’t know what would
be the most descriptive title for the new thread. I’ll name
it “Tracking the Start-up Process of a Flex-RL
application” for now. I can change it later into something
better(your suggestion?).<br>
<a href=
"http://knowledge.robotlegs.org/discussions/examples/12-tracking-the-start-up-process-of-a-flex-rl-application">
http://knowledge.robotlegs.org/discussions/examples/12-tracking-the...</a></p>
<p>See you there :)</p>
<p>Ondina</p></div>Ondina D.F.