PureMVC Architects Lounge

Announcements and General Discussion => Architecture => Topic started by: pedr on July 08, 2008, 07:21:59



Title: Deserialising complex Objects
Post by: pedr on July 08, 2008, 07:21:59
Howdy,

Got to do some serious deserialising from XMLNodes. Built a set of deserialisers that strip the needed data from the node and build fully typed objects accordingly. At the moment I have Proxies consuming the XML and handing off the nodes to the rellevant deserialiser, then offering the returned classes up through their api's.

This has created some dependencies between Proxies - some of the deserialisers rely on objects built by (or cached) by other Proxies. It all works nicely but I just suffered a pang of uncertainty. Should the proxies only offer up the xml, with Commands doing the deserialising?


Title: Re: Deserialising complex Objects
Post by: puremvc on July 08, 2008, 09:52:49
I believe that it is perfectly fine to have the Proxies doing the translation. This would be domain logic not business logic from the PureMVC perspective. It hides within the model tier everything related to maintaining domain consistency. It's perfectly ok to have dependencies between Proxies.

-=Cliff>