문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top