Questions tagged [event-programming]
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.
8
questions
67
votes
5
answers
28k
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:
...
19
votes
7
answers
6k
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 ...
7
votes
6
answers
4k
views
How to create a timed-event architecture using a SQL database
The title of my question is general because I feel like this problem is of a general nature, but to set the stage I'm going to provide a specific example.
We use a homegrown workflow engine that is ...
15
votes
2
answers
5k
views
How do I deal with side effects in Event Sourcing?
Let's assume that we want to implement a small security subsystem for a financial application that warns the users via email if a strange pattern is detected. For this example, the pattern will ...
11
votes
2
answers
1k
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, ...
6
votes
4
answers
5k
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 ...
4
votes
2
answers
7k
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 ...
0
votes
3
answers
963
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;
...