What Is Event Driven Programming?


8 Answers

Anonymous Profile
Anonymous answered
Event driven programming is a particular type of paradigm that functions as a result of some form of input. This input can be from somebody operating the human computer interface or it can also be influenced by messages and orders that are received from another computer program.

When you are using a computer, you are constantly provoking events that will lead to actions being performed by the computer. For example, when you are moving the computer mouse, the sensory input on the bottom of the device is telling the cursor on the screen to move. Likewise, if you were to click an icon on the screen, the clicking event is initiated as a result of that action.

This sort of programming is very common in computer operating systems and graphical user interfaces. This means you are likely to come across event driven programming when you are playing a computer game or navigating your computer’s user interface. It makes use of input devices such as a mouse or a joystick, as well as giving users the ability to move around and interact with a system with relative ease. 

In the past, computers could only be operated solely by entering the precise code required to initiate an action. This meant that a considerable amount of training was needed if you were to operate a computer correctly. However, thanks to the technological developments over time, event driven programming has made computers far easier to operate.

Event driven programming is greatly beneficial because of how user friendly it makes computer applications. It means that almost everyone can operate these systems without the need for expert knowledge on computer programming code such as SQL and Visual Basic.
Abadit Ali Profile
Abadit Ali answered
Before knowing anything about event drive programming, we must know what are the events. 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. By the same way an application can generate Key down event, Key up event, mouse double click event.

Any programming language, which uses these events to run a specific portion of the program, will be called event driver programming. Games are the biggest example of these kinds of applications. The GUI based programs are all developed using event driver programming. The other technology used in contrast to event driver programs is command driver programs, where using the command driven interface a user does each and every task.

The event driven programs are very user friendly and highly interactive systems. The command driven programs are very difficult to operate and are not user friendly. The commands must be remembered in order to work it possible.

All the object based languages and visual languages supports the event driver programming. Visual Basic, Visual FoxPro, JavaScript, Visual C++ and Java are the examples of these languages.
Maarten van dootingh Profile
Event driven programming (or event based programming) is a programming technique for creating responsive programs. By definition it is nothing more than a programming technique in which the software will do nothing until an event occurs. In practice, an event can also be generated by a timer, so the software can appear to do something  'spontaneously' without an external event. Examples of external events are: File events, socket events, (G)UI events. Timers are often used for implementing timeouts for external events.

Examples of applied event driven programming are the windows UI, X-ui, etc, but it is even more useful for implementing responsive programs for embedded applications.
An important prerequisite is the availability of a full asynchronous I/o model, for obvious reasons (this is also where this technique often fails).

An advantage for event driven programming is the lack of concurrent data access by different threads of execution (preventing the need for protecting shared data with all complexity coming with that. This will prevent a lot of bugs)!
A disadvantage is the inability to utilise parallel HW or do background processing for processing intensive tasks (although that can quite simply be solved by forking or implementing worker threads).

But note there is much more to be said about this then can be done in this short answer.
Florio Potter Profile
Florio Potter answered

Event-driven programming is a programming paradigm in which the flow of program execution is determined by events - for example a user action such as a mouse click, key press, or a message from the operating system or another program. An event-driven application is designed to detect events as they occur, and then deal with them using an appropriate event-handling procedure. The idea is an extension of interrupt-driven programming of the kind found in early command-line environments such as DOS, and in embedded systems.

For more information get help at CodeAvail- Online Computer Science Assignment

Anonymous Profile
Anonymous answered
Any programming language which uses event to run a specific portion of the program will be called as Event Driven Programming Language
visual basic,java script,C++ and java are the examples of Event Driven Programming Languages.
Mehboob Khan Afridi Profile
Event Driven Programming:
Event Driven Programming is a most useful programming technique used to fire certain control on the fly. The execution of this type of programming is determined by the user actions such as mouse clicks, mouse over, key press etc. These types of behaviors are commonly noticed while we are filling a form on the web and if we left a required field or some time especially when we enter different passwords in the password fields, we receive a message telling such as "This field is required to be filled, the password you enter doesn't match etc".

This is where the event driven programming works. In the situation like that we can have a pure and fully compatible data from the user. Similarly, the user also feels good while he notice a mistake on the spot. At the other hand flow of execution of batch programming is determined by the programmer. The event fires in any term are recognized by the system and do the action accordingly. The system is programmed such a way to look repeatedly keep track of certain event that are fired which might be an appearance of a folder, a key stroke, a mouse operation or a timer event and then the trigger function is thrown in order to do processing according. The flow of an event execution is as under:
-> Handler (2)
Event Generated -> Events -> Dispatcher -> Handler (1)
-> Handler (3)
Rinav Gangar Profile
Rinav Gangar answered
The flow of the program is dependent on user actions such as click of a mouse, resizing a window.
Your program waits for the event and as soon as an event occurs event handlers will delegate your event and take appropriate action.

Your program flow is not dependent on the Program as in case of Structural Programming or rather Batch Programming.

This is one of the main features of Event Driven Programming...

Hope it Helps!
Anonymous Profile
Anonymous answered
Events  - occurred by some Action. So when ever the action begins the Event has been trigger in such a way that keep on tracking by timer, creation of folder , moue option Etc...   


Answer Question