 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPFreaks: OO PHP Parts One & Two
by Chris Cornutt June 09, 2008 @ 08:48:00
PHPFreaks has posted part one and part two of a new series they're working on to introduce those new to the language to the concepts of object-oriented programming in PHP.
On the old site, I started a series of tutorials named "PHP Application Design". I planned for at least three parts, and while I did publish the first two and wrote at least half of part three, I found myself out of time to make it to the finish. Still dedicated to writing reusable and extensible PHP code and spreading the knowledge, this is a restart of the series, renamed as simply "OO PHP"
In part one he looks at the basics of OOP (terms, defining properties/methods, autoload, exceptions, type hinting, etc) with some code examples sprinkled through out. Part two looks at the "boring OOP principles" like polymorphism, encapsulation and heuristics.
voice your opinion now!
objectoriented programming tutorial principles introduction
Matthew Weir O'Phinney's Blog: PHP globals for the OOP developer
by Chris Cornutt May 25, 2007 @ 10:35:00
Matthew Weir O'Phinney has two new posts that talk about something object-oriented developers seem to shy away from - globals in their classes and how they can make things more difficult to make "embeddable applications" a reality.
In my previous entry, I ranted about the use of globals in popular PHP applications, and how they make embedding said applications difficult. I develop using object-oriented practices, and can honestly say I can't recall ever having slung a global variable around in my own code. Globals seem hackish to me, and as a result, trying to get applications that use them to behave correctly has been a challenge.
In the first part, he notes an interesting find about the $GLOBALS value and illustrates with a code example how he was able to get around it in his instance (wrapping a Serendipity instance in a Zend Framework app).
In part two, though, and uses another code example to show what kind of issues he was seeing with the $GLOBALS - a script that sets some globals in different instances and echoes the results back out.
voice your opinion now!
globals objectoriented developer example code globals objectoriented developer example code
|
Community Events
Don't see your event here? Let us know!
|