Jump to content

Event driven programming language

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ghasulak (talk | contribs) at 03:05, 18 July 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

An event driven programming language is a programming language in which events (mouse clicks, key presses) cause portions of the code to execute.

Events are usually considered to be user-initiated (e.g. a mouse click or a button on the keyboard pressed), but they can also be caused by other portions of the code (e.g. to indicate that a process that takes a long time to complete has completed). An example of an EDP (Event Driven Programing) is Visual Basic.


Creating Event Handlers

The first step in developing an event-driven program is to write a series of subroutines, or methods, called event-handler routines. These routines handle the events that the main program will respond to. For example, in a GUI program, we might be interested in a single (as opposed to a double) left-button mouse-click on a command button. So a routine would be written to respond to such an event. The routine might open another window, save data to a database or exit the application. Many modern day programming environments provide the programmer with event templates so that the programmer need only supply the event code.