Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I think the point is you're not doing anything with the event immediately, just setting the key state so it can be polled later.

Which is event-driven architecture. A component signals that something happened and other components take in that information and update their local state as appropriate.



No, it's not event driven. Maintaining key state up or down and treating it like a discrete I/O input in the rest of the code is not event driven. The event doesn't trigger any behavior. It's an example of how to handle events if that's all you've got as input - map it to non event driven design.


> The event doesn't trigger any behavior.

Yes, that's right. We're talking about EDA, not CQRS or the like. EDA events signal a change of state from one component for other components to synchronize on. They are not commands to react to.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: