Jump to content

Event-driven programming: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Line 15: Line 15:
Hello :D
Hello :D


How you be doing?
==See also==

* [[Interrupt]]
* [[Comparison of programming paradigms]]
* [[Dataflow programming]] (a similar concept)
* [[DOM events]]
* [[Event-driven architecture]]
* [[Event Stream Processing]] (a similar concept)
* [[Hardware Description Language]]
* [[Inversion of control]]
* [[Message-oriented middleware]]
* [[Programming paradigm]]
* [[Publish/subscribe]]
* [[Signal programming]] (a similar concept)
* [[Staged event-driven architecture|SEDA (Staged Event-Driven Architecture)]]
* [[Virtual synchrony]], a distributed execution model for event-driven programming
* [[QP (framework)|QP event-driven framework for embedded systems]]
==References==
==References==
{{Reflist}}
{{Reflist}}

Revision as of 12:34, 4 October 2011

In computer programming, event-driven programming or event-based programming is a programming paradigm in which the flow of the program is determined by events—i.e., sensor outputs or user actions (mouse clicks, key presses) or messages from other programs or threads.

Event-driven programming can also be defined as an application architecture technique in which the application has a main loop which is clearly divided down to two sections: the first is event selection (or event detection), and the second is event handling. In embedded systems the same may be achieved using interrupts instead of a constantly running main loop; in that case the former portion of the architecture resides completely in hardware.

Event-driven programs can be written in any language, although the task is easier in languages that provide high-level abstractions, such as closures. Some integrated development environments provide code generation assistants that automate the most repetitive tasks required for event handling.

In some programming languages (e.g. PL/1), even though a program itself may not be predominantly event driven, certain abnormal events such as a hardware error, overflow or "program checks" may occur that possibly prevents further processing. Exception handlers may be provided by "ON statements" in (unseen) callers to provide housekeeping routines to clean up afterwards before termination.

Hello :D

How you be doing?

References