Signal Fidelity

Tony Smith's Avatar

Tony Smith

12 Jul, 2011 07:35 PM

I actually have two question for the pros out there...

  1. I started using Signals instead events pretty much everywhere. However, I am wondering if there is a piece of the puzzle I missing. Is there a "signal bus" out there? I am currently using signalMap and signalCommandMap but I am still thinking that some kind of bus is in order so that I wouldn't need to mapSingleton on signals just to inject them. Am I missing the boat?

  2. I am finding it to be very useful, if not necessary, to have a signal dispatched when any service call is made and then a signal dispatched when that call is returned. Where I keep stepping on my own feet is trying to decided what data that signal should hold. Should I have:

-addStudentServiceSignal and addStudentServiceResponseSignal and just send the StudentVO as the payload?

-addItemServiceSignal and addItemServiceSignalResponse and just send the contents of the ResultEvent?

-itemServiceSignal and itemServiceSignalResponse and have a "type" property to describe it as "add", "edit"....along with payload?

-serviceSignal that has "isResponse", "type" and payload?

I know this might be a bigger question but I was hoping to hear how some of you implemented notification of service calls or maybe just how you use signals outside of view-mediator communication.

Thanks all

  1. 1 Posted by Stray on 12 Jul, 2011 07:40 PM

    Stray's Avatar

    Signal busses are valid but you have to make your own in order for them to be useful - ie your own "MenuSignalBus" that just exposes static constants for the individual signals.

    Then you inject that SignalBus where you need it.

    I like to call them "Channels" rather than Buses... as they don't really do any busing...


  2. 2 Posted by Tony Smith on 12 Jul, 2011 07:57 PM

    Tony Smith's Avatar

    I guess that does help clean things up a bit. You don't put all signals in a Channel though, do you? Like view to mediator signals?

  3. 3 Posted by Stray on 12 Jul, 2011 08:13 PM

    Stray's Avatar

    no - the view to mediator signals are properties of the view. That's part of their awesomeness.

  4. Tony Smith closed this discussion on 10 Aug, 2011 03:37 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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