Live data from Hacker News

Ask HN: Event-Driven Programming vs. Object-Oriented Programming

news.ycombinator.com

1–2 of 2 posts

Ask HN: Event-Driven Programming vs. Object-Oriented Programming

#1
I am a javascript developer. I am new to Event-Driven development "paradigm", and I have some questions about.

I think that EDP and OOP are not at the same level, so I use Object Oriented paradigm behind Event-Driven. But I am not clear what EDP gives to a OOP project: Order? maintenance? scalability? easier to test? Or is EDP just a good architecture solution for those languages that are not OOP natively?

I've read that can help with dependency injection too. But this can be sorted out using libraries such as RequireJS, can't be?

Re: Ask HN: Event-Driven Programming vs. Object-Oriented Programming

#2
It depends on how you want to handle message passing. Would your architecture be simpler if you could decouple your sender and receiver? It can make it harder to track errors (as in, where the message came from, determining who is listening to it, or tracking down circular logic), but it does give you some very nice options for decoupling. I would strongly suggest looking through the design patterns used in Twitter Flight, which is a framework based largely on an evented system.