Forum Moderators: coopster
But in my own time I use PHP, and I've looked at quite a few open source scripts, and some I inherited along with a website, and it seems to me that either all these programmers have a background like mine, or there is a reason to not use objects and classes. Or is it that like me they find it's easier just to throw together some code and maybe use an include and a function call.
But I could watch a lot of younger web developers - even with a CS degree - that were producing pure spaghetti code. I think this is because most projects are started without any design strategy.
For people like me of course, who did a lot of programming with machine code ("What was that f..ing opcode for a Z80 GOSUB?" - "216" - "Oh, thank you.") when they grew up, all those classes and methods are nothing but a waste of useful bytes. ;-)
I'm sure a true OO programmer would look at my code and tell me that it's still disgustingly proceedural - my message board, for example, doesn't have a class fro message objects - but I think it did do some good. And on the rare few occasions when I've written an actual interactive, stateful program with a GUI, I've found that OO just made sense. Less so with web apps that have to operate over a stateless protocol, and even less than that if I'm dealing with a command-line program. (For that matter, less so if the language is Perl, but that's just the result of some bad experiences with trying to do OO perl.)