note 80151 added to language.oop5.patterns
| From: | tims57 at yahoo dot com | Date: | Mon, 31 Dec 2007 20:57:05 +0000 |
| Subject: | note 80151 added to language.oop5.patterns | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-134634@lists.php.net to get a copy of this message | ||
For anyone who reads: me at chrisstockton dot org
The note being refered to by that post is actually correct. A singleton provides essentially the
same functionality as a global variable refering to an object combined with code to create the
object at first use or application initialization. Using them is just a much more involved and
difficult to follow technique involving class instantiation. Although perhaps appropriate in some
circumstances, for many uses the global variable approach makes more sense.
The note being refered to is also correct regarding design patterns. Using design patterns and using
interfaces should not be confused, they are nothing the same. Authors of 'pay-for
software' (those 'large scale enterprise applications') have to get our laughs some
way or another!
One final point neither note writer seems to get. PHP 5 accommodates many architectures, and is
quite valuable for building scalable applications, even though it is still (thank God) free. PHP is
now one of the 'big guys', and it needs these object oriented capabilities, even though
they might be confusing to some.
----
Server IP: 209.41.74.194
Probable Submitter: 66.214.49.84
----
Manual Page -- http://www.php.net/manual/en/language.oop5.patterns.php
Edit -- https://master.php.net/note/edit/80151
Del: integrated -- https://master.php.net/note/delete/80151/integrated
Del: useless -- https://master.php.net/note/delete/80151/useless
Del: bad code -- https://master.php.net/note/delete/80151/bad+code
Del: spam -- https://master.php.net/note/delete/80151/spam
Del: non-english -- https://master.php.net/note/delete/80151/non-english
Del: in docs -- https://master.php.net/note/delete/80151/in+docs
Del: other reasons-- https://master.php.net/note/delete/80151
Reject -- https://master.php.net/note/reject/80151
Search -- https://master.php.net/manage/user-notes.php