Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

Event Handlers

What is it?

Example

- It is the actual code

which is run when a

trigger occurs.

- If the user clicks

on a button, it

would trigger the

event handler for

Button Click, which

will run the code.

http://www.colourbox.com/image/blue-large-button-click-here-isolated-on-white-background-image-2186508

Event Loops

This is often known as 'Timer' Trigger.

What is it?

Time Oriented Event

Driven Programming

Trigger Functions

Example

What is it?

- If an event is detected,

event is passed to the

trigger functions, which

then call the appropriate

event handler to run any

code in the program

that was designed and

written for the event.

- It is used to select which

event handler to run

according to which event

occurred.

- Scanning for a virus.

You could set it to

scan every second, or

every hour or every

week.

- It is when the user

writes a specific code

that will run at a set

time.

http://kddidit.com/myPubs/tutorials/iWeb.php

Example

http://pcservice-repair.net/Virus-Removal.php

- Clicking on a button

or typing into a

text box.

Forms

What is it?

Example 1

Load:

- an event that occurs

when a form is first used.

- Are major features of

most event driven

programming

environments, as they

are what the user sees

when the program runs.

Events - Examples

Example 2

Simplicity of Programming

- Many event driven languages make

coding simpler by having detached

menus for possible commands.

http://www.effingtechnology.co.uk/databases-and-programming.php

Example

- These make programming much

easier as they:

- show the programmer the choice of

commands for that part of the code

- allow the programmer to choose the

appropriate command without

actually typing it.

--> quicker and more accurate.

- A control such as a button

can easily be put on to a

form from the toolbox.

http://www.diskmania.co.uk/keyboard-mouse.html

Activated:

- an event that occurs

every time the form

receives the focus.

Ease of Development

- EDP languages can make programming

very simple, as the

programming language is very visual.

- Program Development can be easy

with an event driven language.

- Event driven language will

run with as little as only the

code for a simple event to be

completed.

- Visual components

automatically add code.

Operating Systems

Example

- Testing is easier because

each event can be tested

in turn.

How can an operating system can be viewed as an event driven application?

These are events that peripherals sent

to the operating system for handling:

- keyboard when a key is pressed.

- keyboard when Ctrl + Alt + Del are

pressed

together.

- printer when it whats data for the

next page.

- printer when it jams.

- hard disk when a data transfer is

completed.

- Operating systems for personal

computers have always been

event driven.

- When DOS (Disk Operating

System) was still being used,

the operating system was event

driven to respond to interrupts

from peripherals (e.g. printer)

to the processor.

- Modern operating systems have

to deal with all the events that

previous systems had as well as

all the modern events such as:

- mouse when a button is clicked

- when a touch screen is touched

How Suitable are Event Driven Programs

for Non-Graphical Applications

Why?

Example

- Fire alarms are event driven programs as

instead of the user having to activate

the alarm when there is a fire, the fire

alarm is able to activate itself when it

detects smoke.

- They can be suitable because as in

the case of a fire alarm, it activates

itself when the event (the fire) occurs.

- They can also be quite unsuitable as

for CLI (Command Line Interface)

systems (like DOS (Disk Operating

System)), the user needs to remember

operating system commands and

needs to type them in accurately.

http://www.artscondos.com/2011/05/23/fire-alarm-speaker-installation-9th-and-10th-floors-2/

- If they weren't event driven, then the user

input would over-complicate things, as the

application would have to wait for the user's

input to be able to run.

- Non-graphical applications would be able

to run faster if they were event driven

instead of user input, as it can be left

without the needs of updates for long

periods of time.

http://en.wikipedia.org/wiki/Operating_system

Forms

Mouse

Keyboard

- Form Events include

the load event when

the form appears

for the first time.

Events

Throughout this presentation, I will be explaining:

- The mouse events

include left click,

double left click,

right click, and

hover.

- The keyboard events

include key press,

key down and key up.

- The different types of event driven programming

- service orientated

- time orientated

- Event Handlers

- Event Loops

- Trigger Functions

- Events

- Examples

- Forms

- Simplicity of Programming

- Ease of Development

- Operating Systems

- How Suitable are Event Driven Programs for Non-Graphical Applications

http://maslabmit.edu/2011/wiki/Team_Eleven

What is it?

http://ilyasitnikov.com/2011/03/08/html-beginner-tutorial-how-to-set-up-a-basic-page-skeleton/

HTML

User Interface

- There are many possible

events that can trigger

the event handlers to

run.

- The HTML object

events include clicking

on an object which might

then connect connect to

a linked web page.

- User Interface events

include anything that

the user does with a

GUI operating system

or to the form of a

running program.

What can it do?

- Can run several services at

the same time.

Service Oriented Event Driven Programming

What it it?

- It is when the user writes a

specific code that will run on

a given event.

Example

- An email notification is

an event that happens due

to a code running to alert

the user, by vibrating/flashing

(mobile) or creating a pop up

(computer).

http://pennua.org/2010/11/grade-alert-system-is-in-effect/

Event Driven Programming

By Adèle Hanks - 12038710

Learn more about creating dynamic, engaging presentations with Prezi