Event-driven programming refers to the programming technique where the flow of the program is driven by recognition and handling of events such as mouse clicks, key presses, etc.

learn more… | top users | synonyms

51
votes
5answers
7k views

When should I use event-based programming?

I have been passing callbacks or just triggering the functions from other function in my programs to make things happen once tasks complete. When something finishes, I trigger the function directly: ...
11
votes
7answers
2k views

How to ease the maintenance of event driven code?

When using an event based component I often feel some pain at maintenance phase. Since the executed code is all split around it can be quite hard to figure what will be all the code part that will ...
11
votes
2answers
611 views

How does event bubbling generally work and is it synonym to event propagation?

I'm trying to wrap my head around the general workings and principles of event dispatching in event-driven (sub-)systems. Although I have used it on quite a few occasions in for instance Javascript, ...
0
votes
2answers
336 views

What's the simplest way to deal with events in C in this situation?

I'm writing a text-based game, in C. I want the game to handle NPCs movement and actions in the background, while the user is making his moves. I'd also use time-based events to tell the user when ...
5
votes
4answers
3k views

Learning event driven programming [closed]

I want to learn more about event driven programming. Especially where and why I would consider using events. What resources/books should I consider reading to this end? (note: I'm indifferent to ...
0
votes
3answers
437 views

When/Where to create/assign event handlers to its elements

Lets say I have the following code // JS $(function(){ $('[data-mc=logout]').click(function(){ if (!confirm(myconfig.msg['asklogout'])) { return false; ...