I am new to event driven development, and I feel lost when I try to implement events that should pass the core/UI boundary.
In my program I have the following (example in c#):
UI.RuleForm Core.RuleList UI.ResultForm Cell 1 Rule 1 Cell 2 Rule 2 Cell 3 Rule 3
What I want is: when a RuleForm cell changes, it will update the corresponding rule in RuleList. And when the RuleList changes, the resultFrom will be recalculated from the rules.
My current thought is that, in order to keep core logic separated from UI logic (i.e. core should know nothing about UI), core should then only generate events, but not processing events generated by others.
So I have to create some kind of UI.RuleListWrapper which can process RuleForm change events, updating Core.RuleList. RuleList in term should fire OnChange events that UI.ResultForm can use.
So in summary, my questions are:
I want to know if my reasoning and purposed implementation is okay or not, which probably means: should a core module be able to process events generated by outside UI Is my separation some kind of "mysophobia", or has it been done before. Are there other better approaches?