Question

If an event is dispatched by a service should I include the word 'service' in the event class name? For Example TwitterServiceEvent. The same applies to Models and Mediators.

Was it helpful?

Solution

In robotlegs book "Actionscript Developers Guide to Robotlegs" they are not using it that way:

_remoteService.addEventListener(TwitterEvent.OVER_CAPACITY, dispatchOverCapacity);

But if you want it and it helps you, you can have it, why not. I use signals, but when I name signals, I name them the same as the command is named with different suffix:

ConfigureViewSignal
ConfigureViewCommand 

Also, did you check out AS3 Signals and SignalCommandMap for robotlegs? https://github.com/robertpenner/as3-signals https://github.com/robertpenner/robotlegs-extensions-SignalCommandMap

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top