Re: AW: AW: [PEAR-DEV] [RfC] XML_Serializer

From: Date: Tue, 29 Jul 2003 12:05:39 +0000
Subject: Re: AW: AW: [PEAR-DEV] [RfC] XML_Serializer
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18876@lists.php.net to get a copy of this message
Stephan Schmidt wrote:
Hi Greg,
Without documentation of how and why this is any better than wddx_serialize_*(), I am -1.
This is NOT better than WDDX, this is something totally different. This class is not about data interchange, it's about creating XML files from PHP data structures. This class will never unserialize anything, nor will it store meta information like datatypes of the values. It seems you do not understand the purpose of this class, it helps you with the generation of your XML files, like the RDF example I posted yesterday demonstrated. Stephan
I wonder why you can't unserialize? I mean PHP is loosely typed anyways, theres also reflection (is_int(), is_string(), etc) and just adding a single attribute to the root class like "type" you can have this: <userObject type="object">
    <user>Davey</user>
    <name>Davey Shafik</name>
    <email>davey@php.net</email>
</userObject> easily translate back to an object with user, name and e-mail properties using $userObject = new stdClass; $userObject->user = $xml_user; etc <quote>
This class will never unserialize anything, nor will it store meta information like datatypes of the values. </quote>
Storing of meta-data is pointless in PHP anyways, PHP itself doesn't need it and offers reflection stuffs as mentioned above. <quote>
It seems you do not understand the purpose of this class, it helps you with
the generation of your XML files </quote>
Then it is not a serializer IMO, without an unserializer and the fact you say its <quote>something totally different</quote> to WDDX which *is* a serializer it cannot be. I propose a new name: Structure_XML or XML_Data_Structure or if you WANT it to be a Structure to XML package rather than representing PHP Structures in XML then perhaps XML_From_Structure? If you do mean this latter then again, its innapropriately named/called a serializer As it is, without the ability to go back to the native data structure as it was originally I give it a -1 You will need to do these things: 1) Create an "unserilizer" 2) Give it an appropriate name Also, on a side note, why does this exist? http://pear.php.net/package-info.php?package=XML_Serializer - until it has been explicitly said that the package is to be released I don't think we should create these "accounts", or even better till the first release, I mean look at Crypt_Crypt... its been there months with nothing. - Davey

« previous php.pear.dev (#18876) next »