Computer Programming

Computer programming is the process of performing a specific computation designing and building an executable computer program. Programming includes tasks such as analysis, algorithm generation, profiling algorithm accuracy and resource consumption, and algorithm implementation. The goal is to find a set of instructions that automatically executes a task on a computer, often to solve a given problem.

 

Event-driven Programming

Event-driven programming is a programming paradigm which the flow of program execution is determined by events. As 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. Event driven programs can be written in any programming language although some languages are specifically designed to facilitate event driven programming and provide an integrated development environment (IDE). Event driven programming partially is running the production of code and provides a  selection of built objects and controls each which can respond to a range of events .Virtually all object oriented and visual languages support event driven programming. Examples - Visual Basic, Visual C++ and Java. A visual programming IDE like VB.Net provides much of the code for identifying events automatically. when a new application is created the programmer can therefore give attention on issues such as interface design, which involves adding controls such as command buttons, text boxes, and labels to standard forms. Once the user interface is mainly complete the programmer can add event handling code to each control as required.

    Advantages of Event-Driven Programming

1.     Flexibility

2.     Suitability for Graphical Interfaces

3.     Simplicity of Programming

4.     Easy to Find Natural Dividing Lines

5.     Allows sensors and other hardware

6.     Highly Compostable

7.     Simple and Understandable

8.     Purely Procedural and Purely Imperative

9.     Simple and Understandable

10. Allows for more Interactive Programs

11. Allows sensors and other hardware

 

   Disadvantages Event-Driven Programming

1.     Complex

2.     Less Logical and Obvious

3.     Difficult to find Error

4.     Confusing

5.     Slower

 

                      Programming paradigm

Programming paradigm is an approach to solve problem using some programming language or also we can say it is a method to solve a problem using tools and techniques that are available to us following some approach. There are lots for programming language that are known but all of them need to follow some strategy when they are implemented and this methodology/strategy is paradigms. Apart from varieties of programming language there are lots of paradigms to fulfill each and every demand.

 

Command line programming



A command line program is a program that operates from the command line or from a shell. A program is a sequence of instructions that are understandable by a computer's CPU and that indicate which operations the computer should perform on a set of data. A command line is the space in a command line interface (CLI). an all-text display mode on a computer monitor in which users enter commands and data. It provides a means of communication between a user and a computer that is based solely on textual input and output. A CLI is provided by both consoles and terminal windows. A console is a display mode for which the entire monitor screen shows only text and no images. A terminal window is a text-only window in a graphical user interface that emulates a console.

 

Difference between event-driven and command line programming

Event-driven

programming

Command line     programming

 

Event-driven programming use IDE with a Graphical user interface (GUI).

 

command line programming use all-text interfaces as IDEs.

Small programs can code easy more than command line programming

Small programs can code easily but less than event driven progamming

Huge programs with large number of tasks are complex more than command line programming

Huge programs with large number of tasks are easy to create more than event driven programming

Execute slowly more that command line programming

Execution speed greater than Event driven programming

Even driven programming is use OOP principles

Command line programs includes sequential programming

event-driven programming is based on events

event-driven programming is not based on events

If there is an error in our program, we must check all these things

If there is an error in our program, we don’t want to check all these things

 

 

References

1.)    https://benchpartner.com/advantages-and-disadvantages-of-event-driven-programming.

2.)    http://www.linfo.org/command_line_program.html

3.)    https://en.wikipedia.org/wiki/Event-driven_programming

4.)    https://www.tutorialspoint.com/concurrency_in_python/concurrency_in_python_eventdriven_programming.htm

5.)    https://en.wikipedia.org/wiki/Command-line_interface

 

Comments