XML & Entities

Posts   
 
    
KPat
User
Posts: 15
Joined: 26-Mar-2004
# Posted on: 10-Mar-2005 18:47:53   

Frans,

We're currently using ReadXml / WriteXml to translate entities and collections to / from Xml for our front-end. In order to save transmission time, we're using Xsl to remove as much of the xml as possible while still allowing LLBL to regenerate the objects when the data comes back from the client. In testing we've found that not all of the xml generated by WriteXml is required by ReadXml to re-instantiate the object in question. Thus, my question is this:

What is the minimum set of nodes required by ReadXml to re-instantiate an object?

-K

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 10-Mar-2005 23:29:02   

KPat wrote:

Frans,

We're currently using ReadXml / WriteXml to translate entities and collections to / from Xml for our front-end. In order to save transmission time, we're using Xsl to remove as much of the xml as possible while still allowing LLBL to regenerate the objects when the data comes back from the client. In testing we've found that not all of the xml generated by WriteXml is required by ReadXml to re-instantiate the object in question. Thus, my question is this:

What is the minimum set of nodes required by ReadXml to re-instantiate an object? -K

The current readxml relies on the types specified to re-build entity factories, set validator objects etc. etc. So if these types are removed or not present, you won't get a new object created. This means that the default object is used instead, for example, the validator object of an entity.

A related entity reference requires the type specification (in the current readxml code).

It also depends on what you use, adapter or selfservicing. Adapter requires the factory to be specified in entity collection references.

In the 1.0.2004.2 beta, this has been changed: xml can now also be exported in compact form, so you have not the verbose xml anymore, and the code in readxml has been adjusted to cope with the missing type specifications.

Frans Bouma | Lead developer LLBLGen Pro