Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top