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 / Pipes vs. Notifications: I'm Confused on: March 24, 2009, 01:39:16
Hi All,

I'm working on an app right now that has multiple views. Each view handles the CRUD operations of a specific data type. The app is built using a structure based on the slacker demo. As a result, instantiation of each view is delayed until the view is requested by user input. I've been thinking about refactoring these views into modules to reduce the size of the initial download of the app. -- No need to even load the data for each view until the user requests it.

I've been going over the demos/docs/tutorials/forum posts concerning modules to try and wrap my head around the concept, and I'm having trouble figuring out how you would send notifications to all loaded modules.

Right now, after a view has been instantiated using the slacker structure, it registers its interest in certain notifications. Many views are interested in the same notifications, so each notification acts kind of like a message that is broadcast to the entire app. -- Great!

If I re-factor to modules, I assume I should use pipes for communication between modules (module to module and module to shell). What I don't get is wether or not a single pipe message can act like a message that is broadcast to all interested modules similar to the way notifications work. It seems like pipe messages are more rigid. It seems like they can only go in a straight line from one module to another. Is this right or am I thinking about the pipe metaphor too literally? In other words, can I send one pipe message and have several modules register their interest in receiving it like a notification?

Thanks in advance for your responses,

: )

Jason
2  PureMVC Manifold / Standard Version / View vs. Mediator: What code goes where? What, exactly, should a View do? on: March 13, 2009, 12:29:58
Hi All,

I was wondering what the consensus here was regarding the division of labor between a View and its Mediator. In other words, what should the View be responsible for and what should the Mediator take care of?

1. If a View has a form, should the View validate the form or should the Mediator do it?
2. Should the View be able to reset the form? I was doing some forum searches and I came across this thread: http://forums.puremvc.org/index.php?topic=175.0 In it, Cliff seems to advocate having the View take care of reseting its own form.
3. What about printing? Should the View be able to print itself?

Thanks in advance for your thoughts...

: )

Jason
Pages: [1]