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 / General Discussion / Composite data structures on: November 23, 2007, 12:09:59
Hi,

Thanks for responding to my previous questions. I'm getting the hang of this.

I'm wondering what the best approach is for the following.

I have multiple view components, each loading remote data via its own proxy. In one of my view components (call it ViewA), I'd like to display a composite data structure composed of parts of data already available in other views.

i.e. ViewB renders ModelB via ProxyB. I want ViewA to render ModelB and ModelC.

Can I create a mediator for ViewA that simply calls facade.retrieveProxy to access the already loaded proxies and underlying data-structures?

Or is it more kosher to create yet another (virtual) model/proxy for the composite data structure?

I guess what I'm asking is are we free to mix and match and reuse proxies/views/models/mediators?

If so, could I create a "meta-mediator" or application-level mediator into which I could load ALL my proxies so that all my data is accessible in one place and register all my views to that one mediator?

Thanks,

Danny
2  Announcements and General Discussion / General Discussion / Single record sets, collections and proxies on: November 20, 2007, 12:50:40
Hi,

When working with a data set, I often need to return either a single instance (i.e. emplid = 0) or multiple instances (i.e. emplid > 500).

It seems that proxies should either hold an object or an object collection but not both.

What would be the best structure to represent this? Should I have an ObjectVO, ObjectProxy and then an ObjectCollectionProxy that calls back to ObjectProxy?

Thanks,

Danny
3  Announcements and General Discussion / General Discussion / Pre-loading data from remote objects on: November 20, 2007, 11:04:18
Hi,

I'd like to load a remote object via AMFPHP when my application first starts. The object would be accessed over the life of the application.

I'm trying to figure out where the best place to put the initial object load AND where to store the reference to the object.

The object would be used when performing business rules AND it is referenced to populate a combo box.

Where do these top-level data structures go?

How do we load remote objects when the result is an event?

I should mention that the object to be loaded depends on other variables so fetching the object in the constructor of my remote object proxy may not be the best approach.

Thanks,

Danny
Pages: [1]