Hey guys, I am Jesim Hamza a PHP developer. I have devoted my time to teaching and training students who aspire and determined to become a programmer. And today in this post we will discuss a very important aspect that should not be left out in your Programming journey 'Difference Between POP and OOP'. First let's list out the points we will discuss in this post.
- What is Programming paradigm
- What is Procedural Oriented Programming (POP)
- What is Object Oriented Programming (OOP)
- POP vs OOP
What is Programming Paradigm
What is Procedural Oriented Programming (POP)
Procedural Programming is a programming paradigm that is base on subroutines or procedure calls. These procedure calls are also known as functions. They contain sequential steps written to perform some specific task. Functions are defined using a unique name with or without parameters. Procedural oriented languages were first developed in the 1950s or 1960s and some of them include Algol, Basic, Fortran etc.
Features of POP
- Predefined Functions : These are standard set of instructions defined by unique name designed to perform specific task
- Modularity: POP provides modularity that aim at breaking the program into smaller modules and designed to perform simple independent task. These modules are later combined to solve bigger or complex task.
- Scoping: Scoping refers to the area of the program where named entities (such as variables) can be accessed. Scoping can either be local or global
- Libraries: Libraries are collections of predefined functions, classes, codes, etc that can be used throughout the program
Advantages of POP
- In Procedural programming source code is portable. This means code that is written once can be used in other systems.
- Any type and kind of program can be written using POP
- It can be used to reduce code redundancy
- Easy flow tracking
Disadvantages of POP
- It takes much time and effort in building large scale application
- Procedural programming is not recommended for data sensitive project since it's focus is not on data security
What is Object Oriented Programming (OOP)
Features of OOP
- Inheritance: Inheritance is a feature of OOP that allows classes to inherit common properties from other classes. Types of inheritance includes: Single inheritance, multiple inheritance, multilevel inheritance, hierarchical inheritance and hybrid inheritance.
- Encapsulation: Encapsulation refers to binding the data and codes that works together in a single unit. A typical example is Classes.
- Polymorphism: Polymorphism refers to an object which can exist in multiple form. Multiple definition can be given to a single interface. Types of Polymorphism includes Static and Dynamic polymorphism.
- Data Abstraction
Advantages of OOP
- It allows clarity in programming, therefore enable simplicity in solving complex programs
- Codes can be used through inheritance thereby reducing redundancy
- Private data can be kept confidential
- It is very flexible to use
0 Comments
Post a Comment