SlideShare a Scribd company logo
• Events are an important part of Alice
programming, allowing the creation of interactive
worlds with keyboard and mouse user controls.
• Most modern programming languages allow
programmers to add events to new software.
• Events can be used for many other purposes, such
as controlling burglar alarms, checking remote
sensors, or checking for system events, like
printers running out of paper.
• Events are an important part of modern computer
programming.
In computer programming, event-driven programming is a
programming paradigm in which the flow of the program
is determined by events such as user actions (mouse
clicks, key presses), sensor outputs, or messages from
other programs/threads. Event-driven programming is the
dominant paradigm used in graphical user interfaces and
other applications (e.g. Javascript web applications) that
are centered around performing certain actions in response
to user input.
Event Driven Programming is a computer programming
paradigm. Events are the actions that are performed by the
user during the application usage. If a user clicks a mouse
button on any object then the click event occurs. If a user
moves the mouse then the mouse move event occurs.
An event driven programming is a flexible way to allow
the programs respond to many different inputs or events.
This is a programming in which the primary activity is
reaction to the receipt of semantically significant signals.
The signals can be from any source, and most commonly
including timers, human input, sensors, observation upon
shared state, or can be produced during computation when
it react with other signals.
HOW EVENTS WORKS IN EVENT DRIVEN
PROGRAMMING :->
An event occurs whenever an event listener detects an
event trigger and responds by running a method called an
event handler. Modern operating systems and
programming languages contain facilities to let
programmers set up event listeners.
An event trigger can be almost any activity or condition
selected by the programmer, such as a mouse movement,
someone pressing the enter key, or a bank account balance
changing.
EVENT HANDELER :->
An event handler is a method that is activated when the
event trigger occurs.
Almost any method can serve as an event handler, such as
those that play sounds, initiate data communications, or
perform calculations.
EVENT DRIVEN PROGRAMMING
USE OF EVENT :->
1. Events can be used to control objects moving in 3D
space.
2. Detect when some object moves
3 .Detect when two objects collide
4. Make objects move in response to mouse or keyboard
commands.
EVENT TRIGGER :->
An event trigger can be almost any activity or condition
selected by the programmer, such as a mouse movement,
someone pressing the enter key, or a bank account balance
changing.
FLOW OF PROGRAMME :->
PROGRAMME CAN BE WRITTEN IN FOLLOWING
MANNERS :-
Public Function Read() As String
Dim s As String
Dim c As Char()
Dim i As Integer;1]
7k;0]
GetType (CommControl)
m c(read8ufferPosition)
For i = 0 To readEufferPosition — 1
c(i) = ChrW(readEuffer(i))
Next
readEufferPosition = 0
s = New String(c)
End Synctock
Return s
End Function
Private Sub eventThread()
Dim r As Integer
PROGRAMMING FLOW IN EVENT DRIVEN
PROGRAMMING :->
PROGRAMME IN EVENT DRIEVEN
PROAGRAMMING :->
WHAT IS DIFFERNCE BETWEEN OBJECT
ORIENTED PROGRAMMING,PROCEDURE
ORIENTIED PROGRAMMING AND EVENT DRIVEN
PROGRAMMING ?
Procedural Programming simply put is dividing your
problem into smaller parts (utilizing the Divide and
Conqure Law) and then representing each smaller part by
a definitive and exact sub-routine/function/procedure.
Hence you look at the code as a big pile of different
procedures that are coupled with each other, one calling
the other, or one calling many while some not calling
anything but rather doing specific computations and
returning the results. Event Driven?!
do not believe there is such a method that stands alone,
Event driven is a charactaristic rather than a development
approach. Object Oriented Programming (OOP) looks at
your problem ad breaks it down to different objects, each
object has consists of a number of elements, called
Members and Methods. (i.e variables and functions
respectively) so your problem is then defined as the
different objects working together and inside each other
sometimes in a closely coupled manner. the conclusion is,
OOP deals with objects and operations on those objects,
where as procedural development breaks down
computation to little pieces.
Event oriented programming cab be written using any
language like c++ or c or any programming language .but
mainly visiual basic is used to write a programs in event
oriented programming .
USES OR APPLICATION OF EVENT ORIENTED
PROGRAMMING :->
Event-driven programs are typically used in graphical user
interfaces (GUI) and multi-tasking/multi-threaded
environments.
The operating system maintains a message queue
containing events generated by all active applications and
services.
Every message has an ID denoting the target application,
along with the ID of the event itself plus any data that is
relevant to the event.
When an application is idle, it enters an idle loop which
repeatedly checks the first message on the queue.
If the application ID matches, the message is dequeued
and processed. If the ID does not match, the idle loop
terminates.
Since ever application is given an allocated time-slice of
the CPU according to its priority, so long as the
applications are idle during their allotted time then all
messages will be processed fairly rapidly. However, if an
application is busy and the first message in the queue is
intended for it, that message will effectively block all
other messages to all other applications.
The operating system will appear sluggish because
messages are being enqueued all the time but the busy
application is preventing them from being processed.
To prevent this programmers must periodically yield
control to the system during an intensive process to allow
messages to be enqueued, and then enter idle mode to
process any pending messages.
Once it has dealt with those messages it can continue the
intensive process until the next yield point.Since events
can be posted from one application to another,
applications must be prepared to deal with them.
For instance, if the user chooses to shut down the system,
every application will be notified that it must close.
But if the application is running an intensive operation
then it will not be possible to close the application until
that process has been aborted gracefully.
There are various ways of dealing with this but generally
the application will override the idle loop in order to filter
messages.
That is, the override will dequeue messages but will not
process them unless certain conditions are satisfied. This
is known as "eating" events.
If the event is an instruction to close the application but a
process is still running, then the idle loop will store the
event and set an abort flag that the process can check at
each yield point, allowing it to terminate gracefully.
When the idle loop determines there is no running process
but the abort flag has been set, it will reset the abort flag
and repost the event it stored which can then be dealt with
normally
Most modern computer programs that people use have
Graphical User Interfaces (GUIs).
A GUI has icons on the computer screen and a mouse (or
other device) to control a pointer that can be used to
operate the computer.
Modern GUIs like the Word 2007 interface require the use
of event-driven programming.
ADVANTAGE :->
- It allows for more interactive programs. Almost all
modern GUI programs use event driven programming.
- It can be implemented using hardware interrupts, which
will reduce the power used by the computer.
- It allows sensors and other hardware to easily interact
with software.
DISADVANTAGE :->
- For simple programs, event driven programming is often
more complex and cumbersome than batch programming.
- The flow of the program is usually less logical and
obvious.
CONCLUSION :->
There are many uses along with pros and cons when it
comes to Event Driven Programming. One Advantage is
flexibility; in fact you could say that event driven
programming is one of the most ‘flexible programming
language types.’ One of the main reasons being why it’s
flexible is its allowance to let the user design the program
in sections. In other words the programmer is given the
main control over the program in terms of they instruct the
program to do and also the time in which they what this to
happen. ‘Suitability of the graphical interface’‘Simplicity
of Programming’‘Ease of Development’
REFERENCE :->
http://en.wikipedia.org/wiki/Event-driven_programming-
2.http://wiki.tcl.tk/1772--
3.http://searchcloudapplications.techtarget.com/definition/
event-driven-application---
4.http://eventdrivenpgm.sourceforge.net/

More Related Content

Viewers also liked

(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming
Amazon Web Services
 
Service oriented programming with jolie part1
Service oriented programming with jolie part1Service oriented programming with jolie part1
Service oriented programming with jolie part1
Anh Nguyen
 
Importance of the quality of code
Importance of the quality of codeImportance of the quality of code
Importance of the quality of code
Shwe Yee
 
Event Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Event Driven Architecture (EDA) Reference Architecture | Anbu KrishnaswamyEvent Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Event Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Bob Rhubart
 
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDBAWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
Amazon Web Services
 
Data types vbnet
Data types vbnetData types vbnet
Data types vbnet
nicky_walters
 
Decisions
DecisionsDecisions
Decisions
nicky_walters
 
Simple debugging
Simple debuggingSimple debugging
Simple debugging
nicky_walters
 
Design for edp
Design for edpDesign for edp
Design for edp
nicky_walters
 
Software development lifecycle
Software development lifecycleSoftware development lifecycle
Software development lifecycle
nicky_walters
 
Visual Styles
Visual StylesVisual Styles
Visual Styles
Victory Media
 
Ndu06 typesof language
Ndu06 typesof languageNdu06 typesof language
Ndu06 typesof language
nicky_walters
 
Data structures vb
Data structures vbData structures vb
Data structures vb
nicky_walters
 
Decisions
DecisionsDecisions
Decisions
nicky_walters
 
Design documentation
Design documentationDesign documentation
Design documentation
nicky_walters
 
Simple debugging
Simple debuggingSimple debugging
Simple debugging
nicky_walters
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
Danilo Poccia
 
Data types vbnet
Data types vbnetData types vbnet
Data types vbnet
nicky_walters
 
Algorithms
AlgorithmsAlgorithms
Algorithms
nicky_walters
 
Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Introducing AWS IoT - Interfacing with the Physical World - Technical 101Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Amazon Web Services
 

Viewers also liked (20)

(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming
 
Service oriented programming with jolie part1
Service oriented programming with jolie part1Service oriented programming with jolie part1
Service oriented programming with jolie part1
 
Importance of the quality of code
Importance of the quality of codeImportance of the quality of code
Importance of the quality of code
 
Event Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Event Driven Architecture (EDA) Reference Architecture | Anbu KrishnaswamyEvent Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
Event Driven Architecture (EDA) Reference Architecture | Anbu Krishnaswamy
 
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDBAWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
AWS December 2015 Webinar Series - Design Patterns using Amazon DynamoDB
 
Data types vbnet
Data types vbnetData types vbnet
Data types vbnet
 
Decisions
DecisionsDecisions
Decisions
 
Simple debugging
Simple debuggingSimple debugging
Simple debugging
 
Design for edp
Design for edpDesign for edp
Design for edp
 
Software development lifecycle
Software development lifecycleSoftware development lifecycle
Software development lifecycle
 
Visual Styles
Visual StylesVisual Styles
Visual Styles
 
Ndu06 typesof language
Ndu06 typesof languageNdu06 typesof language
Ndu06 typesof language
 
Data structures vb
Data structures vbData structures vb
Data structures vb
 
Decisions
DecisionsDecisions
Decisions
 
Design documentation
Design documentationDesign documentation
Design documentation
 
Simple debugging
Simple debuggingSimple debugging
Simple debugging
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Data types vbnet
Data types vbnetData types vbnet
Data types vbnet
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Introducing AWS IoT - Interfacing with the Physical World - Technical 101Introducing AWS IoT - Interfacing with the Physical World - Technical 101
Introducing AWS IoT - Interfacing with the Physical World - Technical 101
 

Similar to Event oriented programming

Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
VikasTuwar1
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
VikasTuwar1
 
Events vs Notifications
Events vs NotificationsEvents vs Notifications
Events vs Notifications
jeetendra mandal
 
Btec Business Level 3 Unit 14 M1
Btec Business Level 3 Unit 14 M1Btec Business Level 3 Unit 14 M1
Btec Business Level 3 Unit 14 M1
Rachel Phillips
 
SWE-401 - 8. Software User Interface Design
SWE-401 - 8. Software User Interface DesignSWE-401 - 8. Software User Interface Design
SWE-401 - 8. Software User Interface Design
ghayour abbas
 
Operating systems
Operating systemsOperating systems
Operating systems
oswaldm80
 
Functional Requirements Of System Requirements
Functional Requirements Of System RequirementsFunctional Requirements Of System Requirements
Functional Requirements Of System Requirements
Laura Arrigo
 
It in business(komal doua)
It in business(komal doua)It in business(komal doua)
It in business(komal doua)
Komal Khalid
 
Computer Programs & System Softwares
Computer Programs & System SoftwaresComputer Programs & System Softwares
Computer Programs & System Softwares
Abijah Naresh Jumani
 
Introduction to Programming.docx
Introduction to Programming.docxIntroduction to Programming.docx
Introduction to Programming.docx
JohnBrianCatedrilla1
 
Software
Software Software
Software
Joan Arriola
 
system software and application software
system software and application softwaresystem software and application software
system software and application software
Tallat Satti
 
Android 101 Session @thejunction32
Android 101 Session @thejunction32Android 101 Session @thejunction32
Android 101 Session @thejunction32
Eden Shochat
 
Report hospital
Report hospitalReport hospital
Report hospital
Rachit Gaur
 
WBS Final
WBS FinalWBS Final
WBS Final
Vadim Artishuk
 
main
mainmain
Software ppt
Software pptSoftware ppt
Software ppt
switipatel4
 
Software
SoftwareSoftware
Software
Joan Arriola
 
Freedomotic v1.5 whitepaper
Freedomotic v1.5 whitepaperFreedomotic v1.5 whitepaper
Freedomotic v1.5 whitepaper
freedomotic
 
The operating
The operatingThe operating
The operating
11jonesjordan
 

Similar to Event oriented programming (20)

Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
Unit-1.pptx
Unit-1.pptxUnit-1.pptx
Unit-1.pptx
 
Events vs Notifications
Events vs NotificationsEvents vs Notifications
Events vs Notifications
 
Btec Business Level 3 Unit 14 M1
Btec Business Level 3 Unit 14 M1Btec Business Level 3 Unit 14 M1
Btec Business Level 3 Unit 14 M1
 
SWE-401 - 8. Software User Interface Design
SWE-401 - 8. Software User Interface DesignSWE-401 - 8. Software User Interface Design
SWE-401 - 8. Software User Interface Design
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Functional Requirements Of System Requirements
Functional Requirements Of System RequirementsFunctional Requirements Of System Requirements
Functional Requirements Of System Requirements
 
It in business(komal doua)
It in business(komal doua)It in business(komal doua)
It in business(komal doua)
 
Computer Programs & System Softwares
Computer Programs & System SoftwaresComputer Programs & System Softwares
Computer Programs & System Softwares
 
Introduction to Programming.docx
Introduction to Programming.docxIntroduction to Programming.docx
Introduction to Programming.docx
 
Software
Software Software
Software
 
system software and application software
system software and application softwaresystem software and application software
system software and application software
 
Android 101 Session @thejunction32
Android 101 Session @thejunction32Android 101 Session @thejunction32
Android 101 Session @thejunction32
 
Report hospital
Report hospitalReport hospital
Report hospital
 
WBS Final
WBS FinalWBS Final
WBS Final
 
main
mainmain
main
 
Software ppt
Software pptSoftware ppt
Software ppt
 
Software
SoftwareSoftware
Software
 
Freedomotic v1.5 whitepaper
Freedomotic v1.5 whitepaperFreedomotic v1.5 whitepaper
Freedomotic v1.5 whitepaper
 
The operating
The operatingThe operating
The operating
 

More from Ashwini Awatare

Integrated website using social plugins
Integrated website using social pluginsIntegrated website using social plugins
Integrated website using social plugins
Ashwini Awatare
 
Face recogntion using PCA algorithm
Face recogntion using PCA algorithmFace recogntion using PCA algorithm
Face recogntion using PCA algorithm
Ashwini Awatare
 
Face recogntion Using PCA Algorithm
Face recogntion Using PCA Algorithm Face recogntion Using PCA Algorithm
Face recogntion Using PCA Algorithm
Ashwini Awatare
 
Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237
Ashwini Awatare
 
Incredible india
Incredible indiaIncredible india
Incredible india
Ashwini Awatare
 
Image proccessing and its application
Image proccessing and its applicationImage proccessing and its application
Image proccessing and its application
Ashwini Awatare
 
Image proccessing and its applications.
Image proccessing and its applications.Image proccessing and its applications.
Image proccessing and its applications.
Ashwini Awatare
 
Programming language design and implemenation
Programming language design and implemenationProgramming language design and implemenation
Programming language design and implemenation
Ashwini Awatare
 
Cyber crimes and its security
Cyber crimes and its securityCyber crimes and its security
Cyber crimes and its security
Ashwini Awatare
 
Cyber crimes and its security
Cyber crimes and its securityCyber crimes and its security
Cyber crimes and its security
Ashwini Awatare
 

More from Ashwini Awatare (10)

Integrated website using social plugins
Integrated website using social pluginsIntegrated website using social plugins
Integrated website using social plugins
 
Face recogntion using PCA algorithm
Face recogntion using PCA algorithmFace recogntion using PCA algorithm
Face recogntion using PCA algorithm
 
Face recogntion Using PCA Algorithm
Face recogntion Using PCA Algorithm Face recogntion Using PCA Algorithm
Face recogntion Using PCA Algorithm
 
Dma and dma controller 8237
Dma and dma controller 8237Dma and dma controller 8237
Dma and dma controller 8237
 
Incredible india
Incredible indiaIncredible india
Incredible india
 
Image proccessing and its application
Image proccessing and its applicationImage proccessing and its application
Image proccessing and its application
 
Image proccessing and its applications.
Image proccessing and its applications.Image proccessing and its applications.
Image proccessing and its applications.
 
Programming language design and implemenation
Programming language design and implemenationProgramming language design and implemenation
Programming language design and implemenation
 
Cyber crimes and its security
Cyber crimes and its securityCyber crimes and its security
Cyber crimes and its security
 
Cyber crimes and its security
Cyber crimes and its securityCyber crimes and its security
Cyber crimes and its security
 

Recently uploaded

Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 

Recently uploaded (20)

Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 

Event oriented programming

  • 1. • Events are an important part of Alice programming, allowing the creation of interactive worlds with keyboard and mouse user controls. • Most modern programming languages allow programmers to add events to new software. • Events can be used for many other purposes, such as controlling burglar alarms, checking remote sensors, or checking for system events, like printers running out of paper. • Events are an important part of modern computer programming. In computer programming, event-driven programming is a programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, key presses), sensor outputs, or messages from other programs/threads. Event-driven programming is the dominant paradigm used in graphical user interfaces and other applications (e.g. Javascript web applications) that are centered around performing certain actions in response to user input. Event Driven Programming is a computer programming paradigm. Events are the actions that are performed by the user during the application usage. If a user clicks a mouse button on any object then the click event occurs. If a user moves the mouse then the mouse move event occurs. An event driven programming is a flexible way to allow the programs respond to many different inputs or events. This is a programming in which the primary activity is reaction to the receipt of semantically significant signals. The signals can be from any source, and most commonly including timers, human input, sensors, observation upon shared state, or can be produced during computation when it react with other signals. HOW EVENTS WORKS IN EVENT DRIVEN PROGRAMMING :-> An event occurs whenever an event listener detects an event trigger and responds by running a method called an event handler. Modern operating systems and programming languages contain facilities to let programmers set up event listeners. An event trigger can be almost any activity or condition selected by the programmer, such as a mouse movement, someone pressing the enter key, or a bank account balance changing. EVENT HANDELER :-> An event handler is a method that is activated when the event trigger occurs. Almost any method can serve as an event handler, such as those that play sounds, initiate data communications, or perform calculations. EVENT DRIVEN PROGRAMMING
  • 2. USE OF EVENT :-> 1. Events can be used to control objects moving in 3D space. 2. Detect when some object moves 3 .Detect when two objects collide 4. Make objects move in response to mouse or keyboard commands. EVENT TRIGGER :-> An event trigger can be almost any activity or condition selected by the programmer, such as a mouse movement, someone pressing the enter key, or a bank account balance changing. FLOW OF PROGRAMME :-> PROGRAMME CAN BE WRITTEN IN FOLLOWING MANNERS :- Public Function Read() As String Dim s As String Dim c As Char() Dim i As Integer;1] 7k;0] GetType (CommControl) m c(read8ufferPosition) For i = 0 To readEufferPosition — 1 c(i) = ChrW(readEuffer(i)) Next readEufferPosition = 0 s = New String(c) End Synctock Return s End Function Private Sub eventThread() Dim r As Integer
  • 3. PROGRAMMING FLOW IN EVENT DRIVEN PROGRAMMING :-> PROGRAMME IN EVENT DRIEVEN PROAGRAMMING :-> WHAT IS DIFFERNCE BETWEEN OBJECT ORIENTED PROGRAMMING,PROCEDURE ORIENTIED PROGRAMMING AND EVENT DRIVEN PROGRAMMING ? Procedural Programming simply put is dividing your problem into smaller parts (utilizing the Divide and Conqure Law) and then representing each smaller part by a definitive and exact sub-routine/function/procedure. Hence you look at the code as a big pile of different procedures that are coupled with each other, one calling the other, or one calling many while some not calling anything but rather doing specific computations and returning the results. Event Driven?! do not believe there is such a method that stands alone, Event driven is a charactaristic rather than a development approach. Object Oriented Programming (OOP) looks at your problem ad breaks it down to different objects, each object has consists of a number of elements, called Members and Methods. (i.e variables and functions respectively) so your problem is then defined as the different objects working together and inside each other sometimes in a closely coupled manner. the conclusion is, OOP deals with objects and operations on those objects, where as procedural development breaks down computation to little pieces. Event oriented programming cab be written using any language like c++ or c or any programming language .but mainly visiual basic is used to write a programs in event oriented programming .
  • 4. USES OR APPLICATION OF EVENT ORIENTED PROGRAMMING :-> Event-driven programs are typically used in graphical user interfaces (GUI) and multi-tasking/multi-threaded environments. The operating system maintains a message queue containing events generated by all active applications and services. Every message has an ID denoting the target application, along with the ID of the event itself plus any data that is relevant to the event. When an application is idle, it enters an idle loop which repeatedly checks the first message on the queue. If the application ID matches, the message is dequeued and processed. If the ID does not match, the idle loop terminates. Since ever application is given an allocated time-slice of the CPU according to its priority, so long as the applications are idle during their allotted time then all messages will be processed fairly rapidly. However, if an application is busy and the first message in the queue is intended for it, that message will effectively block all other messages to all other applications. The operating system will appear sluggish because messages are being enqueued all the time but the busy application is preventing them from being processed. To prevent this programmers must periodically yield control to the system during an intensive process to allow messages to be enqueued, and then enter idle mode to process any pending messages. Once it has dealt with those messages it can continue the intensive process until the next yield point.Since events can be posted from one application to another, applications must be prepared to deal with them. For instance, if the user chooses to shut down the system, every application will be notified that it must close. But if the application is running an intensive operation then it will not be possible to close the application until that process has been aborted gracefully. There are various ways of dealing with this but generally the application will override the idle loop in order to filter messages. That is, the override will dequeue messages but will not process them unless certain conditions are satisfied. This is known as "eating" events. If the event is an instruction to close the application but a process is still running, then the idle loop will store the event and set an abort flag that the process can check at each yield point, allowing it to terminate gracefully. When the idle loop determines there is no running process but the abort flag has been set, it will reset the abort flag and repost the event it stored which can then be dealt with normally Most modern computer programs that people use have Graphical User Interfaces (GUIs). A GUI has icons on the computer screen and a mouse (or other device) to control a pointer that can be used to operate the computer.
  • 5. Modern GUIs like the Word 2007 interface require the use of event-driven programming. ADVANTAGE :-> - It allows for more interactive programs. Almost all modern GUI programs use event driven programming. - It can be implemented using hardware interrupts, which will reduce the power used by the computer. - It allows sensors and other hardware to easily interact with software. DISADVANTAGE :-> - For simple programs, event driven programming is often more complex and cumbersome than batch programming. - The flow of the program is usually less logical and obvious. CONCLUSION :-> There are many uses along with pros and cons when it comes to Event Driven Programming. One Advantage is flexibility; in fact you could say that event driven programming is one of the most ‘flexible programming language types.’ One of the main reasons being why it’s flexible is its allowance to let the user design the program in sections. In other words the programmer is given the main control over the program in terms of they instruct the program to do and also the time in which they what this to happen. ‘Suitability of the graphical interface’‘Simplicity of Programming’‘Ease of Development’ REFERENCE :-> http://en.wikipedia.org/wiki/Event-driven_programming- 2.http://wiki.tcl.tk/1772-- 3.http://searchcloudapplications.techtarget.com/definition/ event-driven-application--- 4.http://eventdrivenpgm.sourceforge.net/