DEV Community

Cover image for What's the Deal with OOP?
Ben Halpern Subscriber for CodeNewbie

Posted on

What's the Deal with OOP?

Can you help a CodeNewbie out and explain the concept of OOP (Object-oriented programming) in simple terms? It would be extra awesome if you could share an example of how you've implemented OOP principles in one of your projects. Maybe you've utilized classes, inheritance, or encapsulation?

Tell us about your experience and how OOP has enhanced your projects.

Follow the CodeNewbie Org and #codenewbie for more discussions and online camaraderie!

Top comments (4)

Collapse
 
integerman profile image
Matt Eland

OOP is just a reference to song lyrics:

OOP I did it again
refactored my code
made it make sense
Oh, maintainability.
OOP, I think I'm in love
Makes my code make sense
And become reusable

But I don't know. I'm not that musically literate.

Collapse
 
ryencode profile image
Ryan Brown

Seeing your comment got:

You down with OOP (Yeah you know me),

stuck in my head... I can't make anything more of it, but I believe this ages me :D

Collapse
 
polterguy profile image
Thomas Hansen

I could be honest, but then I'd be slaughtered I guess ;)

However, study SOLID principles and design patterns, and look at code examples, preferably created by seniors, with an understanding of architecture and try to understand why the code is the way it is ... ^_^

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard • Edited

I would say learn OOP from people who can explain it well
Beware of the people that treat it as a dogma, aka some Uncle Bob fans.
Practice what you have learnt.
And then keep the parts that serve you well and search a replacement for the rest

In short be agile.