PHP OOP - Object Oriented Programming Introduction
Categories - PHP Tags - PHP   Maniruzzaman Akash   3 months ago   221   0

PHP OOP - Object Oriented Programming Introduction

Let’s start to learn one of the biggest Fundamental things for Advanced programming - OOP (Object Oriented Programming)

Ways to Write Code

There are two ways to write codings in almost any of the programmjng language.

  • Procedural Programming
  • Object Oriented Programming

Procedural Programming

In our previous lectures, we used Procedural PHP to work with anything. Procedural PHP is actually Function based PHP. We have to manage everything with functions and variables. This approach is really hard for big/mid level applications. In those applications, we can not work with Real-life entities using Procedural way. And there comes many repeatative code-base emerge day by day. Thus maintainability becomes impossible.

OOP solves this type of many issues.

What is OOP

OOP’s Full form is Object Oriented Programming. It is a name of procedure or structure how we can manage very large applications or Code-base very easily, efficiently and smoothly.
OOP is not something PHP related thing only. It’s important for any of the programming language like - Java, Python, C++, C# etc.

WHY OOP

There are a tons of reasons to make our programs using OOP. I’ll just give a short list -

● Modular & Clear Code Structure ● Re-use Same Code-base ● Simplicity ● Easily Develop Large System ● Better Productivity ● Less Maintenance Cost

Modular Code Structure

Modular Code structure means - Make very small part of the code and use that code where needed. That modular example could be given like this - Assume, we want to work with some real-life entity like House, Human, Car etc. We first make a class of Car.

Previous
Form Submission and File Upload in PHP - Basic to Advance Level Form Submission in PHP