DEV Community

Introduction to Object-Oriented Programming (OOP) for Newbies

James saloman on November 03, 2023

Are you new to the world of programming and wondering what all this talk about "Object-Oriented Programming" or OOP is about? Don't worry; you're i...
Collapse
 
efpage profile image
Eckehard • Edited

The concept of OOP has been introduced in the early 1960´s and there have been different ideas about this topic. Modern languages like C++ introduce OOP as a syntactical layer. You can perfectly write procedural code in C++ without using any class at all.

In the late 1980´s, many software companies struggeled with the growing complexity of their projects. It was virtually impossible to maintain a monolitic codebase of millions of lines, written by many people. With OOP, it was easy to split the code in smaller units that could be maintained by separate teams.

Codebases of some 100.000 lines of code are not uncommon even for smaller C++ projects, if you count all the libraries that need to be compiled. Compared to this, most web projects are easy peasy.

I´m still wandering, why OOP concepts are so unpopular among web developers. They solve exactly the problems large teams have to deal with.

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

This is a good intro to class based OOP, but that is not the only flavour of OOP around. JavaScript, for example, uses prototype based OOP.