I have just recently started playing with event-driven architectures, coming from a pretty standard object-oriented mindset.
The first thing I noticed was that the difficulty in understanding and tracing through programs seems to increase exponentially with the size of the program. While small pet projects are easy to follow, it feels like the code will rapidly turn to spaghetti.
I understand that I am new to this development mindset and not all of my object oriented worries carry over. Are there any resources on writing maintainable, understandable event-driven code? What do people who use node.js or Twisted or Event Machine do about this?
I did a talk on this topic at Yahoo last year.
Try to look at these articles:
Martyn Loughran wrote an excellent short article entirely about avoiding the callback spaghetti.
What I really enjoyed about his article is the process of improving spaghetti into something nice and clean; it might seem a little formalized at first, but when you see the end result I think you'll agree he shows real artistry in clean, legible, code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With