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 the core development team. Nor do I believe that there are only two true options when it comes to devising visibility requirements: public and protected. There is a place for private methods, in PHP development and elsewhere.

(more…)

Tuesday, December 11th, 2012 @ 10:33 am | Comment (3) | Categories: Best Practices, Object-Oriented Development
Tags: , , , , , , , , , ,

Private Methods Considered Harmful

The following is an excerpt from a draft version of Do This, Not That: Object Oriented Development. Sign up today to be the first to get a copy this week!

A few weeks ago, I was tasked with integrating a library that was designed by someone else. This library was intended to access APIs and return the data so that it could be used by my application. This seemed straightforward enough, except that the API I was working with had a few quirks, namely that it interpreted the query string directly, and so it was possible to have a query string similar to this:

(more…)

Monday, December 10th, 2012 @ 6:00 am | Comment (14) | Categories: Best Practices, Object-Oriented Development, Software Development
Tags: , , , , , , , , , ,


Copyright © 2023 by Brandon Savage. All rights reserved.