SlideShare ist ein Scribd-Unternehmen logo
1 von 5
• 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/

Weitere ähnliche Inhalte

Andere mochten auch

(WRK302) Event-Driven Programming
(WRK302) Event-Driven Programming(WRK302) Event-Driven Programming
(WRK302) Event-Driven ProgrammingAmazon Web Services
 
Service oriented programming with jolie part1
Service oriented programming with jolie part1Service oriented programming with jolie part1
Service oriented programming with jolie part1Anh Nguyen
 
Importance of the quality of code
Importance of the quality of codeImportance of the quality of code
Importance of the quality of codeShwe 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 KrishnaswamyBob 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 DynamoDBAmazon Web Services
 
Software development lifecycle
Software development lifecycleSoftware development lifecycle
Software development lifecyclenicky_walters
 
Ndu06 typesof language
Ndu06 typesof languageNdu06 typesof language
Ndu06 typesof languagenicky_walters
 
Design documentation
Design documentationDesign documentation
Design documentationnicky_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 101Amazon Web Services
 

Andere mochten auch (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
 

Ähnlich wie Event oriented programming

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 M1Rachel 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 Designghayour abbas
 
Operating systems
Operating systemsOperating systems
Operating systemsoswaldm80
 
Functional Requirements Of System Requirements
Functional Requirements Of System RequirementsFunctional Requirements Of System Requirements
Functional Requirements Of System RequirementsLaura 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 SoftwaresAbijah Naresh Jumani
 
system software and application software
system software and application softwaresystem software and application software
system software and application softwareTallat Satti
 
Android 101 Session @thejunction32
Android 101 Session @thejunction32Android 101 Session @thejunction32
Android 101 Session @thejunction32Eden Shochat
 
Freedomotic v1.5 whitepaper
Freedomotic v1.5 whitepaperFreedomotic v1.5 whitepaper
Freedomotic v1.5 whitepaperfreedomotic
 

Ähnlich wie 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
 

Mehr von Ashwini Awatare

Integrated website using social plugins
Integrated website using social pluginsIntegrated website using social plugins
Integrated website using social pluginsAshwini Awatare
 
Face recogntion using PCA algorithm
Face recogntion using PCA algorithmFace recogntion using PCA algorithm
Face recogntion using PCA algorithmAshwini 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 8237Ashwini Awatare
 
Image proccessing and its application
Image proccessing and its applicationImage proccessing and its application
Image proccessing and its applicationAshwini 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 implemenationAshwini Awatare
 
Cyber crimes and its security
Cyber crimes and its securityCyber crimes and its security
Cyber crimes and its securityAshwini Awatare
 
Cyber crimes and its security
Cyber crimes and its securityCyber crimes and its security
Cyber crimes and its securityAshwini Awatare
 

Mehr von 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
 

Kürzlich hochgeladen

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 

Kürzlich hochgeladen (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 

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/