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

3
votes
1answer
73 views

Event system architecture for networking when performance is concerned

How should I design a system for an action game (think in Golden Axe) where events can happen remotely? I'm using TCP for this because the client is in flash. There's so many options, I can make a ...
8
votes
1answer
478 views

Futures/Monads vs Events

In an application framework when performance impact can be ignored (10-20 events per second at max), what is more maintainable and flexible to use as a preferred medium for communication between ...
3
votes
2answers
639 views

Thread safe GUI programming

I have been programming Java with swing for a couple of years now, and always accepted that GUI interactions had to happen on the Event Dispatch Thread. I recently started to use GTK+ for C ...
3
votes
3answers
1k views

Combining multiple events into one action/ Defer refreshing

So in a GUI program I have multiple events that trigger a update of a workspace. This update call is costly so I would want it to not happen very often. A user might pick something from a dropdown ( ...
1
vote
5answers
241 views

Should I use events in this case?

I'm creating a video player, like a custom YouTube player. All of the GUI elements (progress bar, video player, play button, ...) are different classes, but I obviously need them to communicate. When ...
0
votes
1answer
390 views

event source calls methods in a interface

I am using Java. How does an event source like a (button in a GUI) knows which method to call in an interface? For example, I am listening to Mouse Events and have implemented a Mouse Listener ...
9
votes
5answers
539 views

Is event chaining considered good practice?

From time to time I've encountered scenarios where several complex conditions need to be met prior to triggering an event. Furthermore, most listeners also run additional checks to determine the ...
8
votes
6answers
1k 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 ...
4
votes
1answer
682 views

Need to process 2 million 100k messages per second and route them to a particular event, delegate or multicast delegate

I need to process 2 million messages per second (perhaps in a scale out configuration) and route each message to a N delegates or multicast delegates. Question How should I structure my application ...
1
vote
3answers
601 views

Event driven design and separation of core/UI logic

I am new to event driven development, and I feel lost when I try to implement events that should pass the core/UI boundary. In my program I have the following (example in c#): UI.RuleForm ...
11
votes
6answers
3k views

Merits of a “Message Passing” system vs. an “Event Based” system

My question is coming from an somewhat uneducated perspective. What are the relative merits of a "message passing" system vs an "event based" system. Why would one choose one over the other? What ...
7
votes
6answers
2k views

Triggering custom events in AJAX callbacks

I'm pretty new to JavaScript, but one of the things that's been frustrating is that our AJAX callbacks have been getting packed with different functionality, making it difficult to keep everything ...
3
votes
2answers
335 views

How to name event types?

Clean code recommends to name methods to be a verb, and classes to be a noun. I am developing an c++ application using boost::signal as some kind of event framework, and have defined various events, ...
4
votes
1answer
1k views

Which notification pattern is preferable?

I'm working on a view model for a view that presents a dialog with export options. The user selects options then clicks Export. When the view model completes the Export, the calling view model ...
6
votes
4answers
2k views

Learning event driven programming

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
1answer
6k views

What is the difference between routed events and attached events?

I am just going through the WPF concepts I came across these routed events, dependency properties and attached events. What are the concepts behind them and why are they called instead of .NET ...
3
votes
1answer
784 views

Why are wrapper classes not suited for use in callback frameworks?

I just read the question what are callback frameworks?, where the asker cites the following from Effective Java: The disadvantages of wrapper classes are few. One caveat is that wrapper classes ...
6
votes
2answers
547 views

Is it true that websites don't need to use an event driven framework given the stateless nature of the web?

I feel like it's critical to use an event driven architecture with a lot of application types that aren't web sites. However, when coding web sites(which are stateless at the most basic level) it ...
4
votes
2answers
184 views

Does it makes sense to implement an event dispatching system that allows event bubbling for non GUI related objects?

Following up on this question of mine, where I wanted to know the general principles of implementing an event dispatching system that allows for events to bubble (and capturing I've come to learn); ...
11
votes
2answers
509 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
1answer
116 views

How should I keep track of an elements' state within a window/view?

I am trying to implement a view that contains many elements, whose state change depending on the actions you perform on it. I guess this is something that people often run into so I would like to know ...