Posts Tagged ‘architecture’

It's been a while since my last post. My blog pattern these days is that I write a blog post when I have an opinion that doesn't fit in a tweet. :)

There's been a debate in the PHP community about the use of public, private and protected. Apparently the Symfony project has decided that private is Evil, and should not be used. I don't care much about Symfony as I'm not a user, but it turned to a discussion on OO theory when Stefan defended the position by claiming that you 'should have the right to extend a class's methods if it doesn't support the use case you have'.

On Twitter, things got worse. Marco Tabini mentioned private has no role in open source code insinuating that it's about who can read the code and Travis Swicegood mentioned that protected code indicates code that is in the wrong place and later that it prevents unit testing because it creates un-testable units of code.
Read the rest of this entry »