I'm writing a PureMVC AS3 application that (more or less) renders a set of nodes and edges that form a graph. I'm getting the data from a server-side script (Rails 2.0) that generates XML. Right now I have the application put together enough that my GraphDataProxy successfully downloads and parses the xml file containing the list of nodes and edges. Each node and edge element also contains an ID that, when appended to a known URL, will retrieve another XML file with details for that node or edge.
So what I'd really like to do is traverse the nodes in the graph XML document and for each node elementcreate a NodeDataProxy (which loads the details from the node ID), NodeMediator and NodeView that are communicating with eachother. However, I don't see a clean way of giving each NodeDataProxy and its' notifications unique IDs, so that one NodeDataProxy doesn't trigger events on every NodeMediator. I'm also not entirely sure where I should be adding the new NodeDataProxies as they're created, or how I should be accessing them..
I think I'm thinking about this problem in the wrong way, given the PureMVC toolset. Anyone have any thoughts on what the "right" way might be? on NodesDataProxy containing an array of NodeValueObjects? But that still doesn't solve the notification issue..