Over on phpPatterns.com this morning, there's a new piece that can help all of you budding programmers out there to develop a "better way of thinking" about how to design classes in PHP.
Object oriented programming takes some getting used to, quite often meaning a radical shift in the way we design our code and applications. Initially, when making the step up from procedural programming, it's often easy to regard classes as being not much more than a nice way to group a set of functions. Taking this view misses the real benefit of OOP, though, which is how it helps you deal with the inevitable: change.
More and more of the applications that I see, either downloaded or aiding other people in developing, don't use a good form of class design. They either create what this article calls a "God Class" with all of the functions lumped into one place, or they don't create classes at all, embedding the functionality into the actual documents themselves. They offer some good tips, especially if you're just learning how to tame the OOP beast, so check it out!




