Quantcast
Channel: OOP Archives - BrandonSavage.net
Browsing all 26 articles
Browse latest View live

Superglobals In Classes: Revisited

Last December, I wrote about the use of PHP superglobals inside of classes (link here). I asserted at the time that superglobals inside of a class violated some basic rules on what a class was supposed...

View Article



Where Multiple Levels Of Inheritance Will Kill You

One of the best features of PHP’s object model (and really all object models) is the concept of inheritance – that is, derived classes inherit the members and methods of their parents. This is a...

View Article

Use Registry To Remember Objects (So You Don’t Have To)

One of the biggest challenges in OOP programming with PHP is the ability to pass around objects and let other objects use them. This challenge can be solved with careful design, however. Here we will...

View Article

Peer Review: Looking At Abstraction – Redux

This entry is part of an ongoing series involving the review of a code sample and it’s refactoring. For the original code sample, see here. Editor’s Note: The response of the community to this series...

View Article

Peer Review: You Have Not Because You Ask Not (Requests & Responses)

This entry is part of an ongoing series involving the review of a code sample and it’s refactoring. For the original code sample, see here. The topics discussed in this entry may be fairly advanced....

View Article


Why Interfaces Rock

When I first learned PHP 5′s object oriented syntax and rules, I didn’t see much of a point to the interface options. I felt that I could do more by defining abstract classes and at least filling in...

View Article

What Interfaces Are For

A little while ago, I wrote an article discussing why interfaces rock and the way that interfaces work. However, a couple of comments made me realize that I didn’t discuss one of the key elements about...

View Article

Need A PHP Developer? Why You Should Hire Me

There seem to be lots and lots of PHP folks out there looking to hire good PHP developers. Finding the right developer can be a challenge, as can finding the right job. I’ve been looking for a couple...

View Article


Five Tips To Make Good Object-Oriented Code Better

Last week, I did a talk at the Frederick Web meetup about tips and tricks for improving your object-oriented code. A lot of these tips were adapted from a fabulous presentation by Stefan Priebsch but...

View Article


Q&A: Answering Some Questions About Object-Oriented Programming

Last week I wrote about five tips to improve object-oriented code. This generated a number of important questions, which I will attempt to answer for those who asked them. “Often times when a developer...

View Article

Five (Good) Lessons The Government Teaches Us About Object-Oriented Programming

As Benjamin Franklin once famously said, “the only two things that are certain in life are death and taxes.” His point, while political, has a good perspective on one of life’s ever-persistent truths:...

View Article

July Slides

July was a month of talks and travel, including speaking at OSCON and user group talks to DCPHP and PDXPHP. For those who saw the “Micro Optimize This!” talk, you can download the slides here. For...

View Article

In Further Defense Of Avoiding Private Methods

This is a rebuttal post to comments posted Private Methods Considered Harmful I do not wholeheartedly believe that private methods are evil, or that they were mistakenly included in the PHP language by...

View Article


Superglobals In Classes: Revisited

Last December, I wrote about the use of PHP superglobals inside of classes (link here). I asserted at the time that superglobals inside of a class violated some basic rules on what a class was supposed...

View Article

Where Multiple Levels Of Inheritance Will Kill You

One of the best features of PHP’s object model (and really all object models) is the concept of inheritance – that is, derived classes inherit the members and methods of their parents. This is a...

View Article


Use Registry To Remember Objects (So You Don’t Have To)

One of the biggest challenges in OOP programming with PHP is the ability to pass around objects and let other objects use them. This challenge can be solved with careful design, however. Here we will...

View Article

Peer Review: Looking At Abstraction – Redux

This entry is part of an ongoing series involving the review of a code sample and it’s refactoring. For the original code sample, see here. Editor’s Note: The response of the community to this series...

View Article


Peer Review: You Have Not Because You Ask Not (Requests & Responses)

This entry is part of an ongoing series involving the review of a code sample and it’s refactoring. For the original code sample, see here. The topics discussed in this entry may be fairly advanced....

View Article

Why Interfaces Rock

When I first learned PHP 5’s object oriented syntax and rules, I didn’t see much of a point to the interface options. I felt that I could do more by defining abstract classes and at least filling in...

View Article

What Interfaces Are For

A little while ago, I wrote an article discussing why interfaces rock and the way that interfaces work. However, a couple of comments made me realize that I didn’t discuss one of the key elements about...

View Article
Browsing all 26 articles
Browse latest View live


Latest Images