[TYPO3-dev] Moving the topic of the discussion a little bit -- Based of thread "Change roadmap..."
Michael Scharkow
mscharkow at gmx.net
Wed Apr 12 20:03:42 CEST 2006
Dimitri Tarassenko wrote:
> Michael,
>
> On 4/11/06, Michael Scharkow <mscharkow at gmx.net> wrote:
>
>> I agree that TCA should be the one and only source for any model
>> definitions (whatever format TCA itself is is, please not XML!), we
>> should never ever bother with SQL or anything like this again.
>
> And why the heck not XML?
Because TCA is just what it says: A giant array of configuration. The
array structure is perfectly suited for such a thing, the code is
concise and PHP is optimized for using arrays. I just don't see why we
should change that to XML. All TYPO3 does now with XML is just
converting it into another giant array, look at flexforms, locallang,
etc. Other than wasting CPU cycles and memory, I don't understand what
they do.
Funny enough that *you* actually asked a few days ago:
"1. If we still have some serialize()d data in the extensions.xml
metadata (dependencies), what's the point of having it as XML at all?
Why not serialize everything and forget the XML parsers altogether?
2. If the XML gets parsed and then converted into "extensions.bin",
"reviewstates.bin", etc., why can't we just download these pre-parsed
files from the repository?"
So I only say I completely agree with you.
> The biggest advantage of XML here is a formal DTD. I would REALLY
> prefer having a formal DTD for configuration/metadata structures like
> TCA than a wonderful experience of digging the information piece by
> piece from TSRef/Core API Docs again.
Maintaining such a DTD would be completely counterproductive for an
object that needs to be dynamically extendable. What you can do with XML
is only the following (and I remember these arguments from earlier
discussions):
1. Check the syntax: Oh, well, PHP *does* actually check the syntax of TCA
2. Check the semantics with a DTD or schema: Well, we added property X
to property Y, so please update your DTD...
I have not yet seen the advantage of using XML for locallang files, and
I see even less reason for switching TCA to XML. I also don't buy the
import/export argument because a) I don't see any use cases for this
(TCA is for TYPO3 only) and b) you could easily serialize/deserialize
any PHP array into XML if you want to.
Cheers,
Michael
More information about the TYPO3-dev
mailing list