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: How to handle a large amount of data that has dependencies  (Read 6446 times)
grabowski
Newbie
*
Posts: 2


View Profile Email
« on: April 01, 2008, 10:07:45 »

Hi,

I try to create a Application based on PureMVC.
The Application is a Simulation of the Football European Championship 2008.
The Application was developt a year ago and now i try to port it to as3.
It don't want to create a 1:1 copy of the as2 version, so i decided to
create it from scratch with a better architecture.

I have problems to create a good structure of the data that is involved. I have
data from an XML that describes the tournament with teams, rounds and the dependencies between these
rounds ( for example: the opponents of the first quarter final are the winner of group A and the second of group B).

My Data Chunks are matches, groups (that contains specific matches), KO-Rounds.

I decided to create VOs for all the chunks.

Now i have much Domain Logic that works with these chunks of data, for example calculating the group-table. The Matches in the KO-Rounds must be updated if the group tables change etc.

Should i create Proxies for every Match, every Group etc? One Problem is, that the Group Proxies must have access to the GroupMatch Proxies to calculate the group table. Should i give references of the MatchProxies to the Group Proxies?

Or would you prefer to keep the relations between these chunks of data outside of the puremvc world and generate the structure in an proxy. And this specific Proxy updates the data structure triggered by commands. 

I have also a link to the current version, so you can get an overview http://em2008spielplan.bungartbessler.com/
« Last Edit: April 01, 2008, 10:59:29 by grabowski » Logged
trilec
Sr. Member
****
Posts: 52



View Profile WWW Email
« Reply #1 on: April 01, 2008, 04:38:18 »

Hi Grabowski
Just a few thoughts I had looking at your post, I hope it's not off-base.  ;)
It's my understanding that a view is a partial or whole representation of a model/proxy with mediators/commands
controlling the flow of information back and forth.
If your XML data is located in a single proxy it could contain logic for giving out data chunks in the appropriate VO
back to controlling mediators which in turn update the view/UI.

This would mean calculating the group table could be done in the proxy as you mentioned in your last comment.

Trilec
 
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #2 on: April 02, 2008, 07:26:44 »

Hello,

No, I would not have Proxies for each round/match, etc. More likely there would be a RoundProxy with an ArrayCollection of RoundVOs, and a MatchProxy with MatchVOs. There might be an XMLDataProxy that loads the XML and creates the RoundProxy and MatchProxy, passing them the appropriate data.

-=Cliff>
Logged
grabowski
Newbie
*
Posts: 2


View Profile Email
« Reply #3 on: April 04, 2008, 11:29:59 »

Hi,

thanx, for the comments.
I decided to handle the Tournament logic outside of puremvc. In this Modul the elements communicate with each other via events. So it's independent of puremvc. Then I created only one Proxy that communicates with the modul and sends notifications when something changed. Different commands manipulate the proxy. A mediator launches for changes and updates the view.

best regards
grabowski
Logged
Pages: [1]
Print