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

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Architecture / Model VO extending DisplayObject? on: November 20, 2009, 12:50:13
Hello! I've been reading the forums for a while now and it's been of great help.
I've come to the following situation and don't know what would be the best way to solve it.
I'm aware of the model data / view component separation.
But in this case mi "data" is actually a bunch of visual properties for view elements.
These elements are added to a "World" component which has it's own mediator.
Elements don't have mediators.

So the thing is.. If I make an ElementVO holding all these visual props, I have to then copy them to the actual Element which is created by the World Mediator.

I think it would be better to just make the ElementVO the actual Element.
That way, in my ElementProxy, I create all the Element objects and assign there visual props (that's my data).
Then I could pass all the elements to the World Mediator which will add them to the World.

Is this wrong? Is there a better way to achieve this?
Pages: [1]