Join us today!
Best Books/Materials for Learning Object Oriented Programming?
Hello all,
I am looking for suggestions on books that are best suited for getting started on learning object-oriented programming. For me personally, at college I took up to intermediate programming in C++, which introduced some object oriented concepts such as classes, get and set functions, class constructor, destructor, function overloading, stuff like that.
I understand there are many threads like this on Reddit and Quora, but its hard for me to distinguish what is necessary and useful for industrial automation programming.
Any advice and suggestions are appreciated
-Evan H.
Hi @ehixenbaugh,
Personally, I found "Head first design patterns" coupled with the amazing video series by Christopher Okhravi to be a game changer.
The general concept of classes, properties, methods, inheritance, interfaces is quite a small topic. Whereas how and when to apply this to your code is the much larger beast living just behind the scenes.
We all learn differently, but I found the key which unlocked OOP for me was by learning OOP design patterns. Up until that point I was just putting a few classes together and thinking I was doing a good job.
If I were to layout my ideal condenced learning path then I would follow these steps.
- Learn the basics, (methods, properties, classes, inheritance) but don't spend long on this! You just need to know what they are. Too many tutorials which cover the basic spend too long telling you about inheritance which unfortunately makes you believe that this is the best part of OOP, which it's not.
- Learn Interfaces! Use Interfaces! This is the true power of OOP (I have a video which covers Interfaces in PLC here)
- Be aware that you should favour Composition over Inheritance. Look up videos on this. You will realise that you are using OOP to make decoupled code which is nice and reusable. As soon as you introduce Inheritance then this brings back coupling and your code will become complex. Inheritance as a tool can be used, but the important thing is understanding when to use it correctly. Most of the time you can compose objects using other objects without inheritance.
- Be aware of SOLID. If you are new to OOP then SOLID can be far too abstract to understand at the very start but keep this in the back of your head. (A few videos can be found here)
- Learn the patterns. You will hit the same coding problem over and over again with OOP. The OOP design patterns give you a way to code almost anything using a tried and tested way.
My blog: codingbytes
My code: https://github.com/benhar-dev
I used this book from a Portuguese teachers and i can tell you that it's really good. It's Java but suits also for C#, C and C++ regarding the syntax similarities of the languages.
NOTE: i don't know if exists in English 🙄
@raoliveira Ok, I'll check it out and cross reference to see if there is an English version.
Thank you!
@benhar-dev Wow, this is very good information. I'll check out "Head First Design Patterns" first, O'Reilly books are pretty good, I have the "Learning SQL" and "SQL Cookbook" books from them.
Again, as I've said I am not a software engineer or computer scientist by training, I went to school for electrical engineering and took a couple C++ courses. So at this stage in the game, all I have been doing in my programs is making Function Blocks and using Properties and Methods but nothing super complicated.
Shoutout to you and Beckhoff Australia for making your content available at Coding Bytes.
Sincerely, from the USA,
- Evan H.
Hello,
I enclose what I am finding about OOP, I have in markdown with the last updated one if I have time I will leave it nice, I will update it and I will send it to you again...
https://github.com/runtimevic
https://github.com/TcMotion
https://www.youtube.com/playlist?list=PLEfi_hUmmSjFpfdJ6yw3B9yj7dWHYkHmQ
https://github.com/VisualPLC
@ehixenbaugh you are welcome. Greetings from Australia too! 😎
My blog: codingbytes
My code: https://github.com/benhar-dev
- 17 Forums
- 265 Topics
- 932 Posts
- 1 Online
- 688 Members