Why Object Oriented is a dead walking thing?

The software world has gone through some radical changes and developers from various colors and genders find their way into web technologies. The client side (now known as Frontend) is becoming rich (again!) with much logic and state.


I have already went through such technological revolution, it was back in the 90s when I stopped working on Main Frames that took the space of a track, and started coding in C on PC computers.

Later on came that time where C developers where out shined by C++ coders, it was a time with much ambitions, hormones, and Object oriented.

And then Java came, pure-blood object oriented, with the hit ‘write once run anywhere’ and trashed her oldest sister, calling her: C with Classes.

Just object-oriented that thing

It is truth that our eyes where shining with hope and excitement, we believed that if we will only succeed in describing the world with Classes and Inheritance, and objects will encapsulate state, then we will find the answer for the biggest mystery — how do you code a system that is maintainable, and that does not get rotten so [f] quickly.

Many developers are still trained by the rules of Object Oriented Programming (OOP), but it is also known that systems that are built with OOP have many challenges regarding concurrency (multi threading).

When shared mutable state is in order, you need to do crazy things like padding to optimize the thread isolation model (for instance take a look at the source code of Java’s very own concurrent data structures (line 278))

Don’t get me wrong, we owe a lot of modern ideas and design patterns to OOP, and there are places where classes do make sense (i.e. — games), but it was realized that Object Oriented and Concurrency are not best buddies.

Oh, Concurrency

You can also say that lord concurrency has smashed Object Oriented systems to pieces, and brought developers to their knees trying to fight synchronizing issues.
Shared mutable state concurrency is too damn hard:
incorrect synchronization, bottlenecks, deadlocks, starvation, inconsistent behavior, lost updates or dirty reads, are all there like accidents waiting to happen.

Today, it is becoming clearer that functional [reactive] programming has many advantages and platforms such as Angular, depend and expose RxJS Observables as the front gate for its API (i.e. value-changes, routing changes, HTTP calls)

It is important, as concurrency is coming to JavaScript full force.

Gazing at the future with hope

Modern Frontend systems such as Angular, React or VueJS bring to the table a set of great ideas from all times:

Place of respect to (limited) OOP

An invitation for functional programming at the right places

Tools to manage state in a predictable way (Redux, Mobx and the beautiful Vuex)

So take it easy with Object Oriented, and most importantly, remember that there is nothing as dangerous as a warlord with a map and an idea, and keep an open mind !

Everything Web. misterBIT.co.il CTO & Coding-Academy.org Chief Instructor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store