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

Kasper Skårhøj kasper2004 at typo3.com
Tue Aug 10 23:55:54 CEST 2004


Hi Leendert

> There is something real to gain. The advantages OO (and related concepts)
> has to offer :) Especially in a highly extendable system such as TYPO3, a
> proper design and seamless communication is essential, imho. 

In reality it hasn't shown to be essential. Or will you claim that
TYPO3s success is a coincidence despite a bad design?


> If you take a
> look at those 2 points:
> - proper design
> In its true OO meaning, this would mean that an object represents only what
> it should represent, and that what it represents is factored properly enough
> to be able to read, maintain and override its functionality. Not currently
> the case, imho. Or else overriding user authentication logic would be a
> breeze, for instance. Classes as they are now can be factored to many
> smaller classes, with names that would all make sense. It'd make it easier
> to override small parts of TYPO3's functionality, which I often find myself
> doing. It would also make it easier to apply disciplines such as unit
> testing (especially common in the extreme programming world). This would
> make for great quality assurance possibilities. However, I also understand
> that this would implicate a rewrite of the TYPO3 core which would require a
> huge amount of effort. It was just never really refactored into that
> direction along the way, it seems (wasn't there from the beginning, can't
> tell).

Sorry, I have never been schooled as a programmer and its too late now.
TYPO3 is "take it or leave it - or influence it with your own
extensions". I will continue my programming as I always did.

BUT... I do believe that with proper OO design you would *not* have had
an application like TYPO3 as fast as it has been made. OO also is a lot
of programming overhead (takes more time to write)!! Personally I don't
find OO code easier to understand either. I can do procedural
programming 3 times faster. Execution overhead is probably significant
as well. And if newer PHP versions solves that, you cannot use that
argument against TYPO3 which has been developed over 5 years in the
past. 

And I'm not sure you are right about the overriding functionality bit.
It just works a little different as it is now, but you can still do it.
And the Extension API shows that it actually works pretty well.


> - seamless communication
> OO knows a large vocabulary of terminology. This vocabulary has practical
> use - communication. It is easy to communicate when you can speak about
> patterns. A pattern name can be seen as a label for a certain
> implementation. When developers would speak about an "Active Record" for
> instance, that would imply an implementation of the Active Record pattern
> ( http://www.martinfowler.com/eaaCatalog/activeRecord.html ), so everybody
> would immediately know what is going on (maybe at most pointing to a
> resource where the pattern is defined). When I look at the source sometimes
> now, I just get dizzy :)

I'm sorry, I don't understand... :-) I would never have been able to buy
into this "jargon"/language because again; I'm not a "real" programmer
in the classic sense. 


> 
> Anyway, yes, it's a huge amount of effort with no practical gain for the end
> consumer directly (in the long run maybe, when the development process
> starts to create opportunities).

Honestly! The design of TYPO3 *HAS* time and again shown that
opportunities are there despite not being OO design! Otherwise it
wouldn't have been a top-10 OSS CMS (according to Gartner Group
Analysis)

I doubt that it is realistic to go into the effort of redesign. For my
own case; I *know* I could not go through a redesign and "stay alive". I
will quit way before because I have no energy left to start over. For
others; Although we have a community which is very alive I strongly
doubt that we have people who are committed enough to spend years with
such strong dedication that I have had in the past in order to redesign
TYPO3. 

I think the reality is that you should accept that TYPO3 is what it is
and if that is not good enough, start a new CMS from scratch instead (or
use another existing).

And eventually "There is something real to gain." - you didn't show
convincingly what that was.

Question; If the design of TYPO3 is a problem for the future, why are
you using TYPO3 and not another CMS which is better designed in your
opinion?


> 
> 
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
-- 
- kasper

--------
Please notice NEW EMAIL ADDRESS for 2004!! (due to SPAM-contamination)
	
"kasper2004 at typo3.com"






More information about the TYPO3-dev mailing list