What is OOP ? — A Quick Guide to Start

Asela Priyadarshana
3 min readDec 1, 2022
Photo by Joshua Aragon on Unsplash

Object-oriented programming (OOP) is a software design methodology that emerged in the early 1970s and has since become a popular and important approach in many software development languages. OOP is based on the concept of objects, which are data structures that contain both data and methods for manipulating the data. By combining objects and their related methods, OOP allows developers to create complex systems in an efficient and organized fashion.

It uses the DRY principle “Don’t Repeat Yourself” which makes code easy to maintain modify and debug.

The advantages of OOP

  • It allows developers to create reusable code in a modular fashion.
  • It easier to maintain and extend over time.
  • It also encourages developers to think in terms of objects,
  • Allowing Developer to better understand the structure of their code and how the different objects interact with each other.
  • It enables developers to create robust and extensible applications, making them able to adapt to any changes in the environment.

Even though OOP gives lot of advantages, Sometimes OOP can be difficult to learn, especially for those with little to no experience in software development. Developers need to understand the fundamentals of OOP, such as encapsulation, inheritance, polymorphism, and abstraction.

Additionally, developers need to be familiar with the various design patterns and best practices associated with OOP. Without this knowledge, developers may not be able to correctly apply the concepts of OOP to their projects.

If you are intereted in learning OOP step by step try to follow the guide in geek for geeks.

Difference between Procedural and Object-Oriented Programming?

Photo by Nikola Johnny Mirkovic on Unsplash

The difference between procedural and object-oriented programming is often debated among developers and computer scientists.

Both approaches can yield powerful programs, but they differ in several important ways. Understanding these differences is essential for choosing the right approach for a given project.

Procedural programming, sometimes called imperative programming, is a programming approach that focuses on providing instructions for computers to execute in a linear fashion. It’s built around a series of functions, or procedures, which are invoked in sequence to complete tasks. Each procedure consists of a set of code statements, or instructions, which are executed from top to bottom.

This kind of programming is often used for low-level tasks, such as operating system and driver development.

Object-oriented programming (OOP) is a programming paradigm that centers on working with objects. Objects are self-contained, reusable components that can be easily combined to create larger applications. Each object contains its own data and code, and is capable of interacting with other objects.

This approach is often used for larger, more complex applications where the user can interact with the objects. One of the major differences between procedural and object-oriented programming is the way code is organized.

In procedural programming, code is organized into a series of functions, while in object-oriented programming, code is organized into objects.

This makes OOP better suited for tasks that involve a lot of data and logic, such as database programming, graphical user interface design, and simulations.

On the other hand, procedural programming is better for tasks that require a lot of linear logic and mathematical calculations, such as scientific computing and embedded systems. It’s also more efficient in terms of memory usage and can be easier to debug.

Another major difference between the two approaches is the way data is handled. In procedural programming, data is typically stored in global variables and accessed directly from the code. This can lead to spaghetti code and difficulty in debugging. In contrast, object-oriented programming encourages the use of classes and objects, which store data internally and allow for better organization.

In summary, OOP is an important approach in many software development languages. It can be a powerful tool when used correctly, but it is important for developers to have a strong understanding of the fundamentals of OOP before applying it to their projects. With the help of online courses, tutorials, books, communities, and conferences, developers can gain the skills needed to apply OOP effectively.

--

--

Asela Priyadarshana

BICT Undergraduate 🎓 | Associate Software Engineer 😇 | Online Entrepreneur 👨‍💻