DEV Community

Discussion on: What was the hardest concept for you to grasp when learning Object-Oriented Programming?

Collapse
 
ratrateroo profile image
ratrateroo

In real world scenario in oop as of now do often use common design patterns like singleton and other stuff or for complex problems you just do freestyle?

Thread Thread
 
erikwhiting88 profile image
Erik

a little bit of both. Sometimes, problems are so common that we just know we're going to need a singleton (or factory, or observer, etc), so that's what we build.

Other times, problems aren't so obvious and the solution we come up with starts to look like a pattern sometimes.

You don't need to worry too much about design patterns when you're first learning OOP. Get more comfortable with OOP concepts like polymorphism and inheritance, then learn about writing SOLID code. After that, learning design patterns will be really easy.

Thread Thread
 
ratrateroo profile image
ratrateroo

Thank you for sharing your knowledge im starting to see a bigger picture now. I studied oop with java few years ago and that knowledge helped me a lot when i started javascript. From then on i always think in oop.😃

Thread Thread
 
erikwhiting88 profile image
Erik

You're welcome, feel free to ask any questions, I'm here to help!