Unit 1 Frankie Part 2 Flashcards
What is event driven programming?
Object oriented programming which combines paradigms. It uses the principles of procedural programming, but the key difference is the idea that blocks of code are defined, and executed only in response to a specific event being raised.
What does a structure event driven programming consist of?
It consists of Main loop, Call-back function and sub-routines.
What does a features event driven programming consist of?
It consists of Events, Event loops, even handlers, Service orientated processing, time driven and trigger functions.
What is an event handler?
The event handler is the block of code that is intended to run in response to an event. Say you want a message to appear when a button is clicked: the button being clicked is the event, and the event handler is the code that makes the message appear.
What is an event loop?
The event loop is a queue data structure, and it contains a list of events that have been raised, along with any relevant data (for example the x and y coordinates of a mouse click).
What is a service oriented processing?
Service Oriented Processing refers to background services running on a system, that are awoken by events. The easiest example to understand is the USB device recognition service on a modern PC. When a USB device is attached or removed, an event is raised and dispatched to the software service, which enables interaction to determine, amongst other things, what action to take with the new device. Also there is no point of scanning the usb devices constantly because you only need to know when the attached devices change.
What is a time driven?
Time-driven means that the system is sensitive to time. This is easiest to comprehend with an example – perhaps an alarm clock.
What is trigger function?
Trigger functions are the glue that match events to event handlers.