Jump to content

Event-driven programming

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 213.253.39.19 (talk) at 01:58, 18 July 2002 (a stub). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Event-driven programming is a style of computer programming. Unlike traditional programs, which follow their own control flow pattern, only sometimes changing course at branch points, the control flow of event-driven programs is largely driven by external events.

Event-driven programs typically consist of a number of small programs called event handlers, which are to be called in response to external events, and a dispatcher, which calls the event handlers, often using an event queue to hold unprocessed events.

In many cases event handlers can trigger events themselves, possibly leading to an event cascade.

Event-driven programming stresses flexibility and asynchrony as virtues, and tries to be as modeless as possible.