answersLogoWhite

0

Explain event driven programming

Updated: 8/9/2023
User Avatar

Wiki User

11y ago

Best Answer

Let's say, I were to go create a button object for the program user to click on...; the button text might say.

[Click here]

...or,...

[Click here to see Help]

...or,...

[Click here to sort list]

-etc.

At first, the button would just simply sit there; and, therefore, the program would take no further action; except to wait for an 'event' to happen.

Whenever the user of my program clicks on that button; then, the button 'click event' will get triggered.

The users click might trigger off some other code to start working...such as, when the button is clicked on do this/or, do that...display a text message/or, sort list/ -etc.

Each seperate object has it's own list of possible events. For example, a button can have the following list of events...

button.Focus()

button.Click()

button.DoubleClick()

-etc.

so, the program waits to see what type of event is happenning, first ...and, when a certain type of event does, eventually, occur...then, this leads to more programming code getting executed.

This is how OOP/Object Oriented Programming languages...programming using objects/objects that are 'event driven' works.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

Advantages

- 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.

Disadvantages

- 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

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

In an event-driven language, one creates "handlers" that wait for input from the operating system, and when the input is received, the appropriate handler is called. In Windows, the basic function that handles events is known as WndProc. In Java, events are built in to the language, and are distributed by registering event listeners. Other languages use a similar model of event registration. Unlike a console application, which is primarily poll-based, an event-driven application uses fewer CPU cycles, since it doesn't use the CPU when it is idle. The specifics of developing an event-driven program are language dependent, so someone interested in developing such an application should refer to a book, tutorial, or manual on the language of their choice. Common choices include C++, Java, C#, and ActionScript (or other ECMAScript-type languages), but there are many other languages that support event-driven models as well.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

fbxcvnb jvgkhjkb is a event driven program

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Its used in operating systems, internet browser software basically anywhere really, yes you may not be creating the code but you are reading the code hence it is a use.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

I use it so that something will happened depending on an event. For example a left click will have a different affect then a right click.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

Ulus

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Explain event driven programming
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How is event driven programming different from other programming?

write a note on event driven programming


Why vb is an event driven programming language?

because it is driven by events. as it is a language used in programming, then it only makes sense to say VB is an event driven programming language.


Disadvantages of event driven programming?

It uses a wimp hcimaking it user friendly.


What is difference between visual programing and event driven programing?

event driven programming is occur when the creat any event means when the user touch the mouse and visual programming does not any oop


What does event driven scripting language mean?

event driven programming is based upon the events. its flow is based on the events.


What is trigger functions in event driven programming?

Boring and unneccesary


What are the advantage and disadvantage of organizing an event?

There are many advantages of event driven programming. This type of programming is the simplest and flexible forms of programming languages. This means the programmer has more control over the program when the user does something. Also, making an event driven program is easy. There are only a few disadvantages that come with the event driven programming. Firstly, sometimes classes are not often reusable and are hard to carry out in other applications. It is also very complex and hard to master.


Why is visual basic known as event driven programming?

event based programming involves the execution of code when a pre-determined event is triggered. this means... When an event occurs, visual basic runs any code you have written for that event.


What is visual basic short notes?

visual basic is event driven programming langauage.


What are the key features of event driven programming?

ask ruth she is peak p.s. i hope u die


Event driven programming best suited for?

Best suited for programs that require user input. And meth.


What is Event driven programming in VB?

Events are the actions that are performed by the user during the applications 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. By the same way an application can generate Key down event, Key up event, mouse double click event.