Join us today!

Notifications
Clear all

Best Books/Materials for Learning Object Oriented Programming?

7 Posts
4 Users
7 Likes
433 Views
ehixenbaugh
(@ehixenbaugh)
Posts: 29
Trusted Member
Topic starter
 

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.

 
Posted : 03/11/2022 3:58 pm
benhar-dev
(@benhar-dev)
Posts: 17
Eminent Member
 

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

 
Posted : 03/11/2022 10:50 pm
ehixenbaugh, twinControls, rruiter and 1 people reacted
raoliveira
(@raoliveira)
Posts: 27
Eminent Member
 

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.

https://www.google.com/url?sa=i&url=https%3A%2F%2Fm.fca.pt%2Fen%2Fcatalogue%2Fcomputer-science%2Fprogramming%2Fjava-8%2F&psig=AOvVaw0ZJ_a_C0nVFj5QniBPItvB&ust=1667637693096000&source=images&cd=vfe&ved=0CAoQjRxqFwoTCOidvNaQlPsCFQAAAAAdAAAAABAD

 

NOTE: i don't know if exists in English 🙄

 
Posted : 04/11/2022 4:43 am
twinControls reacted
ehixenbaugh
(@ehixenbaugh)
Posts: 29
Trusted Member
Topic starter
 

@raoliveira Ok, I'll check it out and cross reference to see if there is an English version.

Thank you!

 
Posted : 04/11/2022 8:08 am
ehixenbaugh
(@ehixenbaugh)
Posts: 29
Trusted Member
Topic starter
 

@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.

 
Posted : 04/11/2022 8:17 am
benhar-dev reacted
runtimevictor
(@runtimevictor)
Posts: 156
Estimable Member
 

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

 
Posted : 05/11/2022 8:16 am
ehixenbaugh reacted
benhar-dev
(@benhar-dev)
Posts: 17
Eminent Member
 

@ehixenbaugh you are welcome. Greetings from Australia too! 😎

My blog: codingbytes
My code: https://github.com/benhar-dev

 
Posted : 06/11/2022 6:08 pm
Share: