The Secrets Of Event Driven Programming

Time Driven and Service Oriented Programming

For example, time driven programming is when an update is required and a warning pops up telling you about it, when this happens you are able to postpone the update and give the update a time to happen. Another example of time driven programming is on the application ‘Netflix’, if the Netflix user does not use the device for a long period of time, a messages appears asking “Are You Still Watching?” This is a time driven message as the app realizes that it has been idle for a long period of time. Service Oriented programming are applications and things your PC does to improve efficiency, these include things like Anti-virus software and disc de-fragmentation, these things normally happen in the background without the user knowing, however can be manually done by the user. These are normally time driven tasks as well, as your PC for example would realise for example if you had a virus and clean your PC to try and get rid of it.

What Is An IDE?

An IDE is a ‘Integrated Development Environment’. An IDE typically contains a code editor, a compiler, and a debugger, which are all accessed through a single GUI. The user writes and edits source code in the code editor. The compiler translates the source code into a readable language that is executable for a computer. And the debugger tests the software to solve any issues that may have occurred. The IDE’s tool bar is very similar to PowerPoints, on the toolbar you can change, colour, fonts texts and more. Programmers use IDE’s as they are made to improve productivity and efficiency, and because the user can compile a program and immediately returned to the code editor with a chance that any errors could be highlighted. The advantages of an IDE are that it has a fast debugging cycle, real time syntax checking, it has code templates, collaborative tools and graphical forms and application designers and IDE’s have integrated help and facilities such as language and library-based text completion. However, it does have some disadvantages as, normally IDE’s have a high price, also some IDE’s are locked to certain OS and systems, this can be problematic as it means some IDE’s cannot be used on all Operating Systems and finally there is normally a high learning curves which cause problems for beginners.

Advantages and Disadvantages of Event Driven Programming

Advantages

Firstly, event driven programming is very flexible as the ‘flow’ is determined by events, whereas in sequential programming it follows a logical order from start to finish. This is good as it allows the programmer to decide the order in which they carry out the coding. Moreover, EDP is less sensitive about the order in which the user carries out activities and inputs data. In addition, EDP is ideal for GUI’s due to the range of components available, such as boxes and menu’s. EDP is also very simplistic as all of the coding involving event detection is embedded so the porgrammer does not need to know about this. The final advantage of EDP is the ease of development, this is because EDP’s are ideal for rapid application development.

Disadvatages

However, EDP does have some disadvantages, such as EDP can sometimes be slow and inefficient as the event loop in an event driven application is constantly running in the background of the application and does require system resources. Also, as stated in the advantages EDP’s usually have a GUI, however this can also be a disadvantage as GUI’s require high-spec machine. Another advantage that could also be a disadvantages is that EDP’s to an extent could be to simplistic as some of the skills required for sequential porgramming are lost, this includes the ability to create a logical sequential flow in program. Another disadvantage is that it is very difficult to translate from and EDP into non0EDP languages. Finally Visual Basics was made by Microsoft and as a result, is less optimised / doesn’t work on other OS such as Mac.

Operating System

An operating system is abbreviated to OS, an OS is a software that allows a user to run other applications on a computer. Most things done on a computer runs through the OS. The OS starts your computer and makes all the applications work. Without an OS a computer can’t work. The operating system manages a computer's hardware resources, including: Input devices such as a keyboard and mouse, Storage devices such as internal and external drives, Network devices such as modems, routers and network connections, Output devices such as display monitors, printers and scanners. An OS has something called a scheduler, this is a program that organises the use of shared resources. An operating system has a system has a listener that is always listening for new commands or new devices and or drivers. Process scheduling is the removal of the running process of a CPU. An OS also does something called polling. Polling is a process that frequently checks for events in the event queue. Applications can add to the list of handlers for a given interrupt. Hardware generates interrupt and places mouse offset in memory ports, the scheduler receives interrupts and runs the OS event handlers. The scheduler runs constantly organising the pre-emptive multitasking. An OS listens to user-generated events and acts accordingly. The OS maintains important processes by using 3 different types of queues; the job queue, the ready queue and the device queue. There are also 3 different types of scheduling; short term scheduling, long term and medium-term scheduling. The long-term scheduler is called the job scheduler. The short-term scheduler is called the CPU scheduler. The job queue keeps all the processes in the system. The ready queue keeps a set of all processes residing in main memory, ready and waiting to execute.

Suitability of Event Driven Languages for Non-Graphical Applications

There are both advantages and disadvantages of using an Event Driven Language for non-graphical languages. Firstly, an advantage would be that it is easy to use, this is good as it means a programmer can be more efficient. For example, people could argue the fact that something like a washing machine is an event driven program as a washing machine does nothing until the commands are input into it using the buttons which trigger an event. However, this isn’t always true as a washing machine doesn’t know when the clothes are cleaned and does not stop when the clothes are clean it just keeps cleaning them until the time comes where the user programmed to stop. Another example of this would be a microwave, this is because like a washing machine the microwave does nothing until it is instructed to heat something up. Event driven programming is useful in microwaves since a microwave needs the user to tell them how long certain foods need to cook for.

Another example would be an air conditioning system. These are appropriate for event driven programs because depending on the heat and if it’s too hot the user will want to turn the air conditioning on and if it’s too cold the user would want to turn it off. When you press the button, it will trigger a heater which is on the inside and it will go off when it gets to the temperature that the user has set on the dial of the air conditioning hub. An air conditioning system would be an event driven program as when the user selects a temperature on the hub and presses the button, the system will allow air to travel through.

Overall in my opinion I believe event driven languages are suitable in some non-graphical applications but not all of them.

18 May 2020
close
Your Email

By clicking “Send”, you agree to our Terms of service and  Privacy statement. We will occasionally send you account related emails.

close thanks-icon
Thanks!

Your essay sample has been sent.

Order now
exit-popup-close
exit-popup-image
Still can’t find what you need?

Order custom paper and save your time
for priority classes!

Order paper now