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  PureMVC Manifold / MultiCore Version / Context aware UI component on: March 03, 2009, 01:26:28
Hi all,

I'd like some advice concerning how to achieve a context aware UI component.
Say we have some modules who all, in one or more of their views, want to give the user the ability to create a note containing one or more relevant tags, as well as viewing/editing notes relevant to the context. We could then have a Note module containing a create/edit/view note UI-component, a mediator and a proxy that takes care of storing and retrieving notes. Every module in need of this functionality could request the UI-component from the Note module (through pipes) and add it to the modules own view.
The question now is, what if the Note UI-component needs to be context aware when creating and showing notes. I.e. it should only show notes relevant to the context of the view it is currently residing in, in the module to which it has been exported. As the context of the view changes (i.e. a user selects a different row in a table) so should the Note UI-component.
How do we pass this context, from the module's view to the imported UI-component? and how do we continue to do so as the context changes.
Should the UI-component/Note-module, through it's Mediator and Commands somehow be aware of which module it has been exported to, and request the current context (through pipes) of this module before executing any actions, such as retrieving and storing notes? Or should the module utilizing the Note UI-component consequently (through pipes) notify the Note module of it's current context every time the context changes, so that this can be taken into consideration when retrieving and storing notes? Or something completely different perhaps :-)

Is there a best practices way of doing this?

Thanks in advance
Regards,
Simon
2  PureMVC Manifold / MultiCore Version / Proxy - Delegate pattern in a Multicore app, or? on: March 02, 2009, 03:33:57
Hi,

I'd like some advice regarding maintaining a Datamodel across modules.
The core of the scenario is more modules working on (parts) of the same datamodel, with the implications that has of keeping data up-to-date within every module in response to changes made by other modules.
For instance assume a setup where a Customer entity has Persons and Projects associated with it as well as having some other properties. One module (i.e. the Addressbook module) deals with the Customer itself, as well as adding/removing Persons on the Customer. Another module (i.e. the Projects module) works on the Customer by adding/removing Projects.

A way to handle the above scenario could be by using the Proxy - Delegate pattern.  One could make a AddressbookProxy and a ProjectsProxy, both interacting with a CustomerProxyDelegate which in turn communicates with the backend (database) system. In that way, the Delegate is in charge of keeping the model updated and delegate the relevant objects to/from the Addressbookproxy and ProjectsProxy.

How would such a setup work in a multicore app? How would the Proxies of the different modules retrieve the Delegate? Is such a setup desirable or is there a better solution?

Any idea/help is welcome :-)
Thanks in advance

Regards,
Simon
Pages: [1]