Wednesday, 28 May 2008

Event Driven Programming

Event driven programming is a programming paradigm in which actions are performed based on event occurrences.
A system that uses Graphical User Interface (GUI) in interacting with users such as windows has some tools via which users trigger events to perform certain actions. Events could be triggered on mouse click, mouse over, keyboard pressed or it could be triggered by other programs.
Graphical User Interface has some built in components called Objects such as, buttons, radio buttons, combo boxes, text fields and areas, menus, list amongst others. These objects are interacted with by the user either through the mouse or the keyboard to signal an event. Each of the objects is registered with an event listener to be able to sense when an event has been performed on it.
Event driving programming makes computer aided learning very easy and flexible. It aids user friendliness in the use of computer as users can interact quite easily with the system without having too much expertise of the system unlike the command line programming structure which is quite procedural where the user will have to remember all the commands required to perform certain action. In event-driven system, visual aids on the GUI are used where the user can merely click on an icon to perform a number of operations.
Any programming Language that adopts the use of events in performing actions at any point or level of its operation is said to be an Event-driven Programming Language.
There are number of programming languages that adopt the use of event driven programming. All the Object Oriented programming languages such as Java and C++ are event driven programming languages. Other programming languages that use this mode are: Visual Basic, JavaScript, Python and FoxPro amongst others.

No comments: