Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Deserialising complex Objects  (Read 6997 times)
pedr
Port to AS2
Full Member
*
Posts: 27


View Profile Email
« 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?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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> 
Logged
Pages: [1]
Print