News Feed
Sections




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

Nick Lo's Blog:
Mr Dizzy, Getters/Setters and Constructors
July 17, 2006 @ 06:58:07

In this new post on his blog today, Nick Lo provides an entertaining look at getters, setters, and constructors in the context of - what else - a children's book (in the style of the "Mr. Men" series).

One day, while refactoring a web application from procedural to object oriented code, Mr Dizzy decided to use constructors in a way that anyone in Cleverland would have pointed out was really not very clever.

The cutesy story relates Mr Dizzy's quest for an easy solution to using setters and getters. Unfortunately, he makes the wrong decision and puts them in the constructors, causing all sorts of trouble all around. Definitely a great way to relate a message (kids books do it all the time, right?) - kudos to Nick for the idea.

0 comments voice your opinion now!
setters getters constructor mrdizzy zend_db_profiler setters getters constructor mrdizzy zend_db_profiler


blog comments powered by Disqus

Similar Posts

Hasin Hayder's Blog: An interesting bug in ReflectionParameter object in PHP 5.2.1

Tobias Schlitt's Blog: Avoid an endless pifall

PHPMaster.com: Constructors and the Myth of Breaking the Liskov Substitution Principle

Nick Lo's Blog: Mr Dizzy, Getters/Setters and Constructors

Nick Lo's Blog: Mr Dizzy, Getters/Setters and Constructors


Community Events





Don't see your event here?
Let us know!


introduction language community opinion developer refactor unittest install experience laravel framework interview release testing series podcast symfony2 threedevsandamaybe code list

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework