JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Follow publication

Member-only story

What People Learned About Object-Oriented Programming Is Wrong

Josef Cruz
JavaScript in Plain English
5 min readAug 20, 2021

Photo by sean Kong on Unsplash

OOP is a paradigm that brings us a series of possibilities to create more efficient software from more elegant and optimized code. However, to benefit from these potentials, it is necessary to really understand what Object Orientation is.

Many colleges teach OOP disconnected from reality. Thus, key parts of this programming model are left out. As a result, a lot of time is spent teaching examples that have no practical application and that don’t help solve real-life problems.

In this article, I will show you why many people learn about OOP wrong and the consequences. I’m also going to talk about the real asset of object orientation, which is often overlooked in university classes.

Class-oriented or object-oriented? (what is not OOP)

One of the main problems, for example, is that most people actually learned Class Orientation rather than Object Orientation.

I remember as if it was yesterday the torture that it was in college to spend an entire semester struggling with abstract diagrams and examples of animal hierarchies that didn’t make any sense. While the focus was on class modeling, all the real power of interaction between objects was ignored.

It was torture and more than that. However, it was such a waste because the essence of Object Orientation has the power to materialize sophisticated ideas, algorithms, and abstractions in simple and elegant code.

What I feel is that it focuses a lot on structure but not on process. As a result, one starts thinking about static objects and not interacting with objects during the program's execution. This linear and sequential structure reflects more procedural programming, which works with steps than the power of symbolic representation that OOP brings.

As I’ve already mentioned, in OOP, knowing how to create classes, define methods, public or private access modes for attributes is not enough. You need to orchestrate the relationship between objects well. For that, it is necessary to use the power of abstraction to think about the result we want with the code being…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in JavaScript in Plain English

New JavaScript and Web Development content every day. Follow to join our 3.5M+ monthly readers.

Written by Josef Cruz

Entrepreneur, coder, husband, father. I spend my days on the web learning and sharing information across the globe.

Write a response

OOP is a paradigm that brings us a series of possibilities to create more efficient software from more elegant and optimized code.

It promises that, yes. But in general, it doesn't deliver on those promises. Even when following all the usual advice in creating OOP software, you invariably end up in class and interface structures that are too complex.
The real idea of Alan Kay…

--

Ultimately, the most important thing is not the objects themselves but the interaction between them.

Thank you for highlighting this "omission".
Any plans to provide "concrete" examples? If so, thanks in advance!

--

OOP is definitely not optimized. One only needs to look at the ‘ECS’ paradigm used in game development which promises significant performance gains over OOP.

--