Reputation
929
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
6 17
Newest
 Curious
Impact
~13k people reached

  • 0 posts edited
  • 0 helpful flags
  • 183 votes cast
Jun
7
awarded  Nice Answer
May
20
awarded  Popular Question
Feb
20
awarded  Caucus
Nov
2
awarded  Popular Question
Oct
11
awarded  Yearling
Jul
30
comment How to ease the maintenance of event driven code?
@Giorgio, it is more or less the case (for my current problem): events can arrive in random events because the executed part is an async callback. And for the listeners/handlers they are usually registered as a well known sequence, but some extension can register their own handler. In this case the order of execution can be hard to determine without any prioritization system, and this can lead to some bugs.
Jul
30
comment How to ease the maintenance of event driven code?
Thanks for the link, it's a great answer.
Jul
17
comment How to ease the maintenance of event driven code?
@Emmad, this is an example and it is probably over engineered. But it has been 'designed' to solve another kind of maintenance problem. My question is more general: what are you doing when you have to deal with code that is using a lot the event driven paradigm. This kind of code can become very complicated, even in simple GUI. Some technology rely a lot on events outside GUIs, like Hibernate. I'm just trying to collect best practices and advices.
Jul
16
revised How to ease the maintenance of event driven code?
deleted 32 characters in body
Jul
16
revised How to ease the maintenance of event driven code?
edited to reflect that sequence of exec is not very relevant with async activities
Jul
16
comment How to ease the maintenance of event driven code?
I have updated my question. You are totally right about sequence and async stuff. How would you handle a case where event X must executed after all the others event are processed ? It is looking like I have to create a more complex Handlers manager, but I also want to avoid to expose too much complexity to the users.
Jul
16
comment How to ease the maintenance of event driven code?
The need to post this message came from a refactoring when I moved from a inheritance hell to something based on event. On some point it is really better, but on some other it is quite bad... Since I've already had some trouble with 'events gone wild' in some GUI, I'm wondering what can be done to improve maintenance of such event sliced code.
Jul
16
comment How to ease the maintenance of event driven code?
Is their any alternative design to avoid the 'worse than the Spaghetti' ?
Jul
16
revised How to ease the maintenance of event driven code?
adding an example
Jul
16
comment How to ease the maintenance of event driven code?
But if you have dozens of handlers attached to each state, you'll be not so fine when trying to understand what is going on... And every event based component may not be described as a state machine.
Jul
16
comment How to ease the maintenance of event driven code?
Yes, that's an helpful advise. The amount of produced logs can then be frightening (I can remember having some hard time to find the cause of a cycle in the event processing of a very complex form.)
Jul
16
comment How to ease the maintenance of event driven code?
@stijn, it is more a general question than a given case. When there is an event based component it tends to finish like I described it. So I'm looking for other tools and techniques.
Jul
16
revised How to ease the maintenance of event driven code?
added 1 characters in body
Jul
16
comment How to ease the maintenance of event driven code?
@Telastyn, that's true, but sometime you have to consider order (just like when you are using filters on a servlet). If you are using events to decouple components (versus notification only), you will also have to do actual logic (even if indirectly)
Jul
16
revised How to ease the maintenance of event driven code?
improve question using the comments.