Even Driven Programming:
This is the process where the flow of the program is determined by certain events such as: * Senor output * User actions i.e. mouse clicks, key presses * Messages from other programs * Threads
As users we have come across event driven program every day when we use a computer i.e. navigating through our computer user interface, also whilst playing computer games. By clicking on the mouse the computer picks up the event that has been made by this action, same goes for when we play computer games. This is because the events driven program picks up the actions that have been carried out, reads it then gives an output.
Event driven programming allows flexibility as it gives users full control whilst designing the program as they tell the program what it should do and at what time it should carry out the event. The key features of events driven program are: * Service oriented - this means everything illustrated on the screen provides a service to the user. * Time driven – this is where the event will only occur from the users input for example when they click on a button * Event handlers – this is when a code is activated when an event occurs for example when a user clicks on a print preview button, when the button is pressed the code that is linked to the button is activated and thus allows the event to occur thus bringing up the print preview page * Trigger functions – this is the same as the event handlers * Event – this is where the program is notified that something has happened for example when a user clicks a button on a keyboard. * Event loops – this is where the program checks for all possible events non-stop * Flexibility – due to flexibility making changes to event driven program will be easy, users tend to change their minds. * Ease of development – simplicity of programs means that events driven programs are easier to develop, maintain and amend.
The