I couldn’t agree more with you, Chroniclemaster1!!
(Finally, a voice of reason!)
OOP is just a variation of procedural programming. It’s mostly about the focus and discipline which come from trying to build larger projects without going insane. If you think of a class as a superstruct, they’re virtually identical, OOP was developed by procedural programmers after all. The biggest difference is that all of your programming code and data have to be grouped into a class (ie in procedural programming you use structs as a best practice to organize groups of data but you don’t HAVE to use them). In OOP that pattern is basically defined as a best practice and made mandatory; everything is grouped into a class (which is usually pretty easy on the one hand until you’re left with a few scraps lying around and have to shove them into a class named something silly like ApplicationHelper (or whatever).
Oh, I think I get OOP theory. I am just finding it harder to apply dry textbook examples to a real-world system. And being a perfectionist, I want to do something that would make the senior members on SitePoint proud of me.
The more I read up on things like MVC, the more I see there are a lot of “OOP Prima Donnas” out there. Clearly, “you get what you pay for”, and a lot of the “help” on websites/blogs across the Internet is filled with bad information.
And so I have been trying to take the various approaches/opinions and get clarifications here so I know that I am using the “right” approach.
In my defense, I asked some pretty basic questions last week. The problem is that many people 1.) Don’t read, and thus 2.) Answer the wrong question, as well as 3.) Going off on tangents. (Some even get mad at “me” when others did that?!)
I don’t mind tangents, but one reason for my “countless other questions” - as Oddz put it - is because simple threads morphed into things that weren’t answering the original question.
(When it is more relevant, I’ll go back and re-read everything, and am sure I’ll find some really helpful gems!)
Far and away, the best book I’ve found on programming in general is Steve McConnell’s Code Complete 2. That’s how I learned virtually everything I know. It’s so sensible, and readable that you’ll probably sit down for your first skim and read it cover to cover. It’s like getting to grab a guru and sit down for several hours to unlock the secrets of the universe. The thing that makes McConnell so great is that he identifies complexity as the number one enemy of any programming project and proceeds to give you all the tools you need to make your life simpler. He also cites numerous other books at the end of each chapter which gives you the perfect platform to jump into more detail on any particular topic you feel like diving into next. Chapter 9 PPP (Psuedocode Programming Process) is one of the most important chapters you’ll read in any programming book ever, but the whole thing is a fantastic overview. The book is designed for all programming languages though most of his examples are in C++ and Java, so he definitely leans strongly toward OOP best practices.
Well, Chroniclemaster1, my main problem got a lot easier after Friday…
I start a contract on Monday after being unemployed for over a year.
Assuming this new gig pans out, I don’t have to spend 90% of my time worrying about paying bills and supporting my household, and now I can maybe step back and take a slightly more leisurely approach to this.
I will likely go back and re-read some books I read last year on Advanced PHP (using OOP) and on OOP. I also think I’m going to try and get through “Head First: OOP Design Patterns”, because even if it is more advanced than I need, it will “expose” me to different ways to conceptualize classes, objects and systems. (A little OOP humor there!)
At the same time, my wife and I still want to get this business going, so I don’t want to spend to much time “theorizing”.
I have done an excellent job doing my requirements, now it’s time to roll up my sleeves and see if I can finally build my first web app using OOP!