1

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.

hidarikani
  • 1,121
  • 1
  • 11
  • 25

1 Answers1

1

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

ThanksBro
  • 911
  • 1
  • 7
  • 20
  • 2
    "..if you want it and it helps you, you can have it.." - i agree. The main thing (other than suitable names of course) is to be consistent with your naming strategy. –  Feb 07 '13 at 12:33
  • 1
    @Matej Šimunić shouldn't you capitalize the first letter of class names like `ConfigureViewSignal` — it looks very odd not to. – Mark Fox Feb 23 '13 at 23:14