[TYPO3-ect] latest extension coding guidelines

Ries van Twisk typo3 at rvt.dds.nl
Tue May 29 21:45:22 CEST 2007


On May 29, 2007, at 1:36 PM, Ingo Renner wrote:

> Ries van Twisk wrote:
>
>>> Even when doing MVC, lib/div could use the marker concept for  
>>> templates.
>>> You could still have a marker ###SOME_TEXT### rendered by a PHP  
>>> method
>>> $someObject->getSomeText().
>>
>>
>> My big problem with the marker concept is that it does a horrible  
>> job for
>> anything that is repeated. I cannot loop through datasets and I  
>> cannot
>> format incoming data. All this needs to be done within the extension.
>> As you can see from extensions like tt-news, user-register etc
>> the code is just horrible to work with. And from many users I get  
>> complains
>> that TYPO3's templating methods are from from easy if you need to  
>> have
>> anything
>> that the phpcode of an extension cannot handle
>
> * well, you could just name your subpart ###LOOP_NEWS### ...
Yes horrible....
It just creates a lot of overhead in my extensions and slows down  
overall performance.

> * you can format data with TS
Agreed... I do that often (make use of stdWraps where possible)

> * let's not talk about the code of tt_news. That's a different stoy,
I can come up with other extensions if you like.....
Mininews, how do I make alternating rows?!?! (goes quickly and check  
if it's possible....)

> tt_news has grown over time and we know that it needs a 3.0 rewrite to
> keep it maintainable at all.
Agreed...

>
>
>> For example to create a template with alternating row colors  
>> during list
>> display
>> is virtually impossible without creating a odd and even templates
>> parse that with php.. render that using the markers... truly  
>> horrible.
>> (what if I want
>> to have 3 colors during list display in tt_news, it's impossible  
>> and non
>> flexible.
>
> this is possible, at least in tt_news it's so flexible that you can  
> have
> hundreds of alternative/alternating
I never seen that, but I admit I don't know much about tt_news,
just that I had to do alternating rows once and I could only see
a option for odd/even rows.


>
>
>>> The other thing is that it is not PHP5. I mean if we're starting  
>>> a MVC
>>> library, why do we use PHP4 then? If I remember right I've even seen
>>> comments in lib/div like "we can't do this or that because of  
>>> PHP4" - so
>>> why using PHP4 at all? If you want to do serious MVC you should  
>>> also go
>>> with PHP5. If you do things, do them right.
>>
>> Com on, don't give me that!!! For the whole sake of typo3  
>> compatibility
>> we do it in PHP4.
>> So I do feel that when typo3 core says php4 rulez, then extensions
>> should work (where possible) with php4 aswell.
>
> Why do you limit yourself?
Because quite a number of people still have php4 installations.
It's not that WE (ECT team) limit ourselves. But minimum requirement
for TYPO3 is version 4. So lib/div's minimal requirement is version 4.

I remember the same debate about using MySQL and that Typo3 uses the  
'mysql standard'
and then I think by myself... why limit ourselves..... So the answer
is we follow the requirements what TYPO3 advices in the coding  
guidelines? (long
time since I have read it)



> The core at the moment says it's working on PHP4 AND on PHP5, but  
> itself
> uses PHP4 only. I'd always use PHP5 if I can.
I always uses PHP5, but as you might know Enterprise installations  
often get
EL4 installed which runs PHP4.

> No one is going to limit you. Especially as it's an extension not  
> the core.
No, that is not true.. since the extension is put on TER we try to be  
as compatible
as possible.

>
>
> Ingo
> _______________________________________________
>


I am a loooong time user of the #typo3 channel and I speak to quick a  
number of people
and I see a lot of questions asked, often it's about templating....



-- 
Ries van Twisk
Freelance Typo3 Developer
email: ries at vantwisk.nl
web:   http://www.rvantwisk.nl/
skype: callto://r.vantwisk






More information about the TYPO3-team-extension-coordination mailing list