Signal Fidelity
I actually have two question for the pros out there...
-
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?
-
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
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Stray on 12 Jul, 2011 07:40 PM
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...
Stray
3 Posted by Tony Smith on 12 Jul, 2011 07:57 PM
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?
4 Posted by Stray on 12 Jul, 2011 08:13 PM
no - the view to mediator signals are properties of the view. That's part of their awesomeness.
Tony Smith closed this discussion on 10 Aug, 2011 03:37 PM.