Re: Singletons in PHP
- From: "Sanders Kaufman" <bucky@xxxxxxxxxxx>
- Date: Mon, 3 Dec 2007 01:13:24 -0600
"Willem Bogaerts" <w.bogaerts@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:4750130c$0$237$e4fe514c@xxxxxxxxxxxxxxxxx
As with so many things, you don't really NEED them. Singletons are (or
are often abused as) global variables: You never know when these objects
are constructed, and have very little control over it. When it comes to
unit testing, they can be a real pain in, you know where.
The main problem is that they do not abide the Law of Demeter: they do
not come in through the interface of your objects.
Willem - could you explain that last sentence, please?
.
- Follow-Ups:
- Re: Singletons in PHP
- From: Willem Bogaerts
- Re: Singletons in PHP
- Prev by Date: Re: What is the difference between exceptions and simple error handling techniques?
- Next by Date: javascript content in $_POST
- Previous by thread: Re: Singletons in PHP
- Next by thread: Re: Singletons in PHP
- Index(es):
Relevant Pages
|