A best practice question

thomas.thorstensson's Avatar

thomas.thorstensson

10 Aug, 2012 04:35 PM

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

  1. Support Staff 2 Posted by Ondina D.F. on 10 Aug, 2012 04:53 PM

    Ondina D.F.'s Avatar

    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. 3 Posted by thomas.thorstensson on 14 Aug, 2012 07:31 PM

    thomas.thorstensson's Avatar

    Indeed! I shall continue doing as I have in this matter,

    Good day

    Thomas

  3. Support Staff 4 Posted by Ondina D.F. on 15 Aug, 2012 11:11 AM

    Ondina D.F.'s Avatar

    Good day to you, too.

  4. Ondina D.F. closed this discussion on 15 Aug, 2012 11:11 AM.

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