08-26-2021 12:02 PM
So as I am getting deeper into DQMH usage, one of the questions I keep asking is "Should this be a status update broadcast or it's own broadcast broadcast?" On the one hand, I might argue that a broadcast should only be necessary if there is a payload. But what if the listener wants to take action on the "notification"? It is obviously much easier for it to register for separate broadcasts than to try and parse/select on a status string, which is probably going to be more verbose than say a brief message label (ala Messenger Library observer notifications). So know I have to think about if any of the listeners might care to react to my messages? Smells like coupling to me. So the logical conclusion for me is that most updates going to the external world would be better served by having its own broadcast event, so my module does not care about who is listening. So now, what is the status update broadcast good for? I would guess only notifying about State of the MHL, but since the MHL isn't actually a state machine, that could get murky. Suddenly the Status Update Broadcast, while a convenient swiss army knife for broadcasting, seems riddled with practical gotchas.
Would some of the experts mind chipping in? Thanks!
08-26-2021 12:47 PM
I'm fairly certain I've only ever used Status Updated as a debugging tool. The tester for my module is registered for it, along with the testers for any other modules that call my module. You should never be parsing your Status Updated broadcast string for certain messages. I tried that one time as a shortcut for something and Fabiola yelled at me. Never again. 😛
08-26-2021 01:52 PM
@Darren wrote:
I'm fairly certain I've only ever used Status Updated as a debugging tool. The tester for my module is registered for it, along with the testers for any other modules that call my module. You should never be parsing your Status Updated broadcast string for certain messages. I tried that one time as a shortcut for something and Fabiola yelled at me. Never again. 😛
Same here.
08-26-2021 04:55 PM
@Darren wrote:
I'm fairly certain I've only ever used Status Updated as a debugging tool. The tester for my module is registered for it, along with the testers for any other modules that call my module. You should never be parsing your Status Updated broadcast string for certain messages. I tried that one time as a shortcut for something and Fabiola yelled at me. Never again. 😛
+1
DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )
09-04-2021 02:33 AM
Makes senses. Thanks for the input.