Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DotGeek.org:
Data Encapsulation and Code Reuse
Jan 08, 2004 @ 13:15:07

In all of the code floating around out there, there's one thing that most programmers missed - the reuse of code, be it theirs or another coder's. Reuse of code is a skill that every programmer should master, not just PHP coders. So, DotGeek.org has posted a new tutorial to help you understand why code reuse is such a good thing.

In The Importance of Data Encapsulation and Code Reuse, the author discusses data encapsulation (the method by which programmers group code that has a reusuable base together according to the Object Oriented Design (OOD) Model) and how to do this with PHP classes/methods/objects. The code samples that they give are quite simple, even for someone not that familiar with object-oriented programming in PHP.

Overall, this piece isn't a bad introduction, but it goes no further than that. Perhaps, though, it's just enough to get people to use libraries and/or someone else's code...

tagged:

Link:


Trending Topics: