[Typo3-dev] singletons instead of pre-loaded objects

Martin T. Kutschker Martin-no5pam-Kutschker at blackbox.n0spam.net
Fri Aug 13 22:07:50 CEST 2004


Peter Niederlag wrote:
> Hi,
> 
> Martin T. Kutschker schrieb am  9.08.2004 um 19:04 Uhr CEST
> 
> 
>>Robert Lemke wrote:
>>
>>>On Mon, 2004-08-09 at 20:47, Martin T. Kutschker wrote:
>>>
>>>
>>>>Why? You need some place to store the object references. As options
>>>
>>>I >see either a global array, a master object known to be loaded or
>>>factory >objects for every singleton (the object has a method with a
>>>static var >as storage).
>>>
>>>Because the recommended way for implementing the Singleton pattern
>>>is not to store instantiation information in a global variable but
>>>use a static variable within the class itself (at least that's what
>>>I remember from the GOF book). 
>>
>>Have this seen in implementations (XOOPS).
> 
> 
> BTW. afair XOOPS claimed to be an OO-rewrite of phpnuke. So one could go
> and have a look:
> * how much work it has been

The code looked too me like a big rewrite with some snippets of old 
include-style-php lying around. Plus there were much changes from 1.x to 
2.0. Then it got stuck because the main developer, stopped working on it.

> * how the project is doing

Some folks took AFIK up and some work is going on. But from an OO 
standpoint there are still a few tidbits all around the place. The basic 
design is sound, but these old remnants pop-up here and there.

My infos are about half a year, a year old or so. Dunno where they are 
now code-wise.

> * ask about gains of the redesign

I have developed some extensions. and really liked the OO-concept. 
Building extensions was easy and fast. It could still have some more 
stuff for "rapid protoyping" but basically its nice.

> In case somebody real badly wants to devote some time into this issue.

XOOPS and Typo3 are very different.

Masi





More information about the TYPO3-dev mailing list