Page 3 of 3

Posted: Fri Jan 19, 2007 3:57 pm
by Ambush Commander
you're doing essentially hat I had in mind. It's verbose, to be sure.
Hmm. I was thinking of some sort of metadata mapper, where this XMLWriter takes the objects, reads out the public variables and stuffs them in XML. Obviously, there'd be problems with circular references. It's still a vague idea. I'm also wondering whether or not it would be appropriate to put XML generation code in the model classes themselves.

Posted: Fri Jan 19, 2007 4:08 pm
by Kieran Huggins
That's what I do - each model will generate XML either from the database or a chached copy, depending on modtime. Updating the model invalidates the cache - you can update the model however you see fit.

Posted: Fri Jan 19, 2007 4:15 pm
by Ambush Commander
Okay, now I'm confused. Could you elaborate?