Thanks Justin!
Your concerns are legitimate. As this example is pretty useless, it's really hard to tell, but I guess it really depends on the kind of modules you're building.
If you were to build a Log module for ex. would you dispatch a LogEvent from the other modules, or a MyModuleSaySomethingEvent which would then be translated by the Shell to a LogEvent? Both would end up in a log, but i would rather use the 1st solution. The 2nd solution would mean that for all the modules i have to register a translator to LogEvent.
In some other case you would not want to couple your modules and use your "translator" approach.
Hope it helps to clarify, and thanks for your comment.
Thanks Justin!
Your concerns are legitimate. As this example is pretty useless, it's really hard to tell, but I guess it really depends on the kind of modules you're building.
If you were to build a Log module for ex. would you dispatch a LogEvent from the other modules, or a MyModuleSaySomethingEvent which would then be translated by the Shell to a LogEvent? Both would end up in a log, but i would rather use the 1st solution. The 2nd solution would mean that for all the modules i have to register a translator to LogEvent.
In some other case you would not want to couple your modules and use your "translator" approach.
Hope it helps to clarify, and thanks for your comment.