Introduction to Event-driven programming
Event-driven programming known as a computer programming paradigm that used the occurrence of events to determine the control flow of the program. This type of application is designed to detect events as they occur, and use an appropriate event-handling procedure to deal with it, which normally use a callback function or method.
Theoretically, event-driven style of programming is supported in all programming languages, but they may different in the way of implement it, for example, it’s easier to implement in languages that provide high-level abstractions, such as closures. Besides, for other programming environments such as Adobe Flash, they are specifically tailored for triggering program code by events.
Generally, there is a main loop in an event-driven application that used to listen for events and triggers a callback function when there are events is detected.
Key features and characteristics of event-driven programming
Service Oriented
Service oriented is a key features in event-driven programming that used to write programs that are made for services and it takes does not slow down the computer as service oriented only consume little of the computer processing power and usually services run in the background of OS.
Time Driven
In event driven programming, time driven is a paradigm, it’s a code that runs on a time trigger, time driven can be a specific code that runs on a specific time, which could be once an hour, once a week or once a month, this means it’s a pre-set to do task. For example, windows update is the example of time driven, which user can set when to update or when to check and download the update.
Event Handlers
Event handlers is a type of function or method that run a specific action when a specific event is triggered. For example, it could be a button that when user click it, it will display a message, and it will close the message when user click the button again, this is an event handler.
Trigger Functions
Trigger functions in event-driven programming are a functions that decide what code to run when there are a specific event occurs, which are used to select which event handler to use for the event when there is specific event occurred.
Events
Events include mouse, keyboard and user interface, which events need to be triggered in the program in order to happen, that mean user have to interacts with an object in the program, for example, click a button by a mouse, use keyboard to select a button and etc.
Simplicity of Programming and Ease of Development
Event-driven programming is simple and easier to program compared to other type of programming as it’s very visual, for example you can place a button by just select it and place it onto a form and write a code for it. Event-driven programming also easy for user to insert a pre-written code scripts into an existing application because it allows user to pause the code while it’s running. Which make developing using event-driven programming is easy.
Find Out How UKEssays.com Can Help You!
Our academic experts are ready and waiting to assist with any writing project you may have. From simple essay plans, through to full dissertations, you can guarantee we have a service perfectly matched to your needs.
View our services
Compare Event Driven Programming with Object-oriented Programming (OOP)
As mentioned above, event-driven programming known as a computer programming paradigm that used the occurrence of events to determine the control flow of the program, while objects-oriented programming (OOP) treats datafields as objects manipulated through pre-defined methods only and it constructed over four major principles, which are Encapsulation, Data Abstraction, Polymorphism and Inheritance.
JavaScript, ActionScript, Visual Basic and Elm are the example for event-driven programming, while C++, C#, Java, Python, Ruby and Scala are the examples for object-oriented programming.
In event-driven programming, a program is executed when they detected an event occur, for example, use mouse to click a button to show a message. Besides, in object-oriented programming, emphasis is given to data and classes are the main part of OOP, which mean classes are the blueprints of object and keep the data secure in the classes, only methods of particular classes are allowed to view the data.
The classes are also different between event-driven programming and object oriented programming. In OOP, classes can be created by own while in event-driven programming user must use the defined classes.
Object-oriented programming and event-driven programming may use together, which mentioned above that event-driven programming are support in all programming language, it’s just the way of implement it may different.
References
What is event-driven programming? (2017). Retrieved January 17, 2017, from http://www.computerhope.com/jargon/e/event-driven-prog.htm
1010, zakkcuthbert. (2014, November 7). Key features of event driven programs. Retrieved January 17, 2017, from https://zakkcuthbertunit14eventdrivenprogramming.wordpress.com/2014/11/07/key-features-of-event-driven-programs/
Event-driven programming (2017). . In Wikipedia. Retrieved from https://en.wikipedia.org/wiki/Event-driven_programming#Common_uses
Comparison of programming paradigms (2017). . In Wikipedia. Retrieved from https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms
Studytonight. (2016). Object oriented programming concepts in C++. Retrieved January 17, 2017, from http://www.studytonight.com/cpp/cpp-and-oops-concepts.php
Essay Writing Service Features
Our Experience
No matter how complex your assignment is, we can find the right professional for your specific task. Contact Essay is an essay writing company that hires only the smartest minds to help you with your projects. Our expertise allows us to provide students with high-quality academic writing, editing & proofreading services.Free Features
Free revision policy
$10Free bibliography & reference
$8Free title page
$8Free formatting
$8How Our Essay Writing Service Works
First, you will need to complete an order form. It's not difficult but, in case there is anything you find not to be clear, you may always call us so that we can guide you through it. On the order form, you will need to include some basic information concerning your order: subject, topic, number of pages, etc. We also encourage our clients to upload any relevant information or sources that will help.
Complete the order formOnce we have all the information and instructions that we need, we select the most suitable writer for your assignment. While everything seems to be clear, the writer, who has complete knowledge of the subject, may need clarification from you. It is at that point that you would receive a call or email from us.
Writer’s assignmentAs soon as the writer has finished, it will be delivered both to the website and to your email address so that you will not miss it. If your deadline is close at hand, we will place a call to you to make sure that you receive the paper on time.
Completing the order and download