

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Compare and contrast the procedural, object oriented and event driven programming in source code of application. Contrast between procedural/OOP/Event Driven paradigm Procedural programming. In procedural programming, program is divided into small parts called functions. In procedural programming the execution of program statements is predetermined and controlled by the programmer. Procedural programming follows top down approach. There is no access modifiers in procedural programming. Procedural programming does not have any proper way for hiding data so it is less secure. Procedural programming is based on unreal world. Languages supports: C, FORTRAN, Pascal, Basic etc. Object oriented paradigm In object oriented programming, program is divided into small parts called objects. In object oriented programming computer programs are designed using the concept of objects that interacts with the real world. Object oriented program follows bottom up approach Object oriented programming provides data hiding so it is more secure. Object oriented programming is based on real world. Languages supports: C++, Java, Python, C# etc. Event-driven paradigm In event-driven flow of the program is determined by events such as user actions (mouse clicks or key presses) sensor outputs, or messages from other programs or threads. In event driven programming the program execution is largely determined by the system. In event-driven programming paradigm, one defines what will occur when a user executes an event.
Comparison between procedural/OOP/Event Driven paradigm Procedural programming. Procedural programming means that as a series of steps you describe a program and its subprograms. Declarative programs in procedural paradigm attempts to define the result irrespective of the steps taken to calculate it but rather some description or denotation of the desired result. Procedural programming relies on what’s known. Procedural code is quicker to implement for simpler code but gets increasingly complex and difficult to manage as the program gets larger. Object oriented paradigm Object-oriented programming is a way to organize code around the concepts of encapsulation, inheritance, replacement, programming to interfaces etc. Object oriented programming is meant to address the difficulties with procedural programming paradigm. Object Oriented Programming allows for easy re-use of code and enabling faster coding and managing on larger projects Event Driven paradigm Event-Driven Programming shares some features with OOP that include the use of variables, procedures, classes and objects. Event based programming is about writing event handling procedures and having the core event loop provided by the underlying system. You can save the trouble of writing your own event loop and benefit from various libraries that already work with the system provided event loop. Event based programs are very often writing using object oriented style but not always. This programs allow for reusability of codes and as such different programs may use the same codes similar functions.