Re: patterns in SPL and PEAR
| From: | Lukas Smith | Date: | Tue, 19 Apr 2005 11:46:32 +0000 |
| Subject: | Re: patterns in SPL and PEAR | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37280@lists.php.net to get a copy of this message | ||
Bertrand Mansion wrote:
Lukas Smith wrote:err .. yes :-)Hi, since both ext/SPL and PEAR are increasingly making classes available with the sole purpose of exposing OO design patterns I would like to make sure that both sides know this and that we try and remain compatible as much as possible. Especially in things like method naming. ext/SPL Observer: http://www.php.net/~helly/php/ext/spl/interfaceObserver.html ext/SPL Subject: http://www.php.net/~helly/php/ext/spl/interfaceSubject.htmlThose are interfaces, not classes :)
It is also nice to see that Marcus is working on pretty and useful interfaces. I only wish his work could be better advertised (on Planet PHP for example). Marcus, don't you have a blog ! :)I am his unofficial promoter in the PEAR realm :-) Also most of internals is somewhat anti OO, so he is probably too disgruntled. So its time we make him feel better about the great work he is doing. I would also like to mention the following entry in the manual. It has sample implementations of the factory and singleton pattern. The important bit here is that its likely that alot of users will follow the sample naming conventions. So maybe we should also favor "singleton()" over names like "getInstance()". http://www.php.net/manual/en/language.oop5.patterns.php regards, Lukas