Back to the Basics of Object-Oriented Programming
September 15, 2013
So, I’m really confused right now and not really sure what to do about learning proper programming principles, techniques, and skills because at the same time I need to modify legacy code to enable new functionality that our clients need.
While I am starting to use classes and instantiate objects I still feel like I’m writing procedural programs and not true Object Oriented programs.
I want to start using a testing framework like PHPUnit but it’s inner working are very object oriented and doesn’t even work with older version on php.
I bought the book “Working Effectively with Legacy Code”, but it is also very heavy on the OO side.
My ultimate goal is to turn our existing legacy php code into Ruby on Rails applications while at the same time maintaining the legacy php in order to keep our customers happy and the business alive. In order to accomplish the enormous task I’m going to need to refactor the legacy code and starting adding in tests so that I’ll know when things break as I start adding functionality. I also see all of this refactorying and testing as an important process to learning how the current code base works, so that when I start building our Rails app I’m not going to be leaving out key features and functionality that I had no ideas existed.
I’ve been trying to learn Rails, and some PHP frameworks (Zend and Lithium), but I feel like my limited knowledge in OO programming is getting in my way. And so I feel like I need to take a step back and learn the principles of Object-Oriented programming before I can truly transform the software into the clean and elegant programs I know they can become.
I have a book called “Practical Object-Oriented Design In Ruby” which I think will be a good start for me, but I’m not sure if there is a more appropriate book that I should be reading to learn the fundamentals of Object-Oriented Programming? I’ll let you know how it goes.