Key Features of Event Driven Programming

895 Words4 Pages
The key principles of event driven programming are: Interface, Triggers, Events and Internal Locus of Control. The interface is what the user interacts with to trigger events in a program, for a calculator, this would be the buttons. The triggers are the things that need to happen to an interface for an event to happen, with the calculator this could be the mouse pressing down on a button. Events are processes that are called when a trigger occurs, in the calculator example this would be a number being displayed on the screen or a calculation taking place. Finally, the Internal Locus of Control is the way in which a program makes the user feel as if they are in control, for the calculator this could be changing its theme or changing the calculator between scientific, programmer, statistics or basic layouts. Examples Desktop For a desktop, one interface could be applications or folders on the screen. These can be triggered with a left or right click on a mouse or a keyboard press such as pressing the right arrow on a keyboard to select an icon to the right of the current selected one. The event triggered is different depending on what trigger you give. If you click, it will open the application. If you drag the icon it will be moved to the location of the mouse cursor. When you right click you get a menu of options and properties. With the keyboard you can also use hotkeys, or global hotkeys. Hotkeys will only work if you are currently on the desktop, however global ones will work no matter what program you’re in. The Internal Locus of Control, also known as customisation, would be moving icons around, changing the background and more. System Tray The interface for the system tray is the icons that are contained within the tray. The way these can be triggered is similar to the desktop; with left or right clicking and hovering. The events caused by left
Open Document