Differentiate between event driven paradigm and algorithmic paradigms

Operating SystemHardwareSoftware & Coding

Let us understand what algorithmic paradigms are.

Algorithmic paradigms

An algorithmic paradigm is a generic model or framework that underlies the design of a class of algorithms. It is an abstraction higher than the notion of an algorithm, and higher than a computer program.

The different algorithm paradigms are as follows −

  • Brute force paradigm.

  • Greedy paradigm.

  • Backtracking paradigm.

  • Divide and conquer paradigm.

  • Dynamic programming paradigm.

Event-driven paradigms

The event-driven is a programming paradigm where the flow of the program is determined by events like user actions (mouse clicks, key presses), sensor outputs, and message passing from other programs or threads.

Given below is the diagram of event driven paradigm −


The major differences between event-driven and algorithmic paradigms are as follows −

Event-Driven ParadigmsAlgorithmic Paradigms
It is a programming paradigm in which the flow of the program is determined by events such as user actions (mouse clicks, keypresses).It is a generic method or approach which underlies the design of a class of algorithms.
This approach is used for Hardware description languages.This approach will be used in high-level languages.
Examples include Event Handlers such as mouse clicks used in the Graphic User interface, Interrupt mechanism in Drivers.Examples include Divide and Conquer, Greedy algorithms, Dynamic programming.

Based on the need and context we can decide what to use how to use it. For example, we have a system where we need to show a popup on click of the checkbox then it is better to use an event-driven based paradigm.

Updated on 01-Dec-2021 11:57:13