A best practice question
Hello Dear Robotlegs users.
Having used Robotlegs for a long time I notice some habits in the way I do things and it's interesting to get other peeps feedback on best approach.
When communicating between two mediators (i.e) two views exchanging some information, I often have one mediator dispatch a framework event that another mediator catches. For example NavigatorMediator dispatches an event that a ViewMediator catches.
NO INJECTION OF COURSE!
Buuut, notice I do not have an intermediary command as I tend to use those mostly to operate on model, service, or proxy. Would you say that it's a better practice to:
Communicate between mediators over commands.
Thanks in advance
T
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ondina D.F. on 10 Aug, 2012 04:53 PM
Hi Thomas,
There is no need to use a Command in order to communicate between Mediators, in my opinion.
One Mediator dispatches an Event, the other Mediator listens for it. Done.
Ondina
2 Posted by thomas.thorsten... on 14 Aug, 2012 07:31 PM
Indeed! I shall continue doing as I have in this matter,
Good day
Thomas
Support Staff 3 Posted by Ondina D.F. on 15 Aug, 2012 11:11 AM
Good day to you, too.
Ondina D.F. closed this discussion on 15 Aug, 2012 11:11 AM.