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 / Re: Pipes vs. Notifications: I'm Confused on: March 24, 2009, 04:02:54
Hi Cliff,

Thanks very much for the clarification! -- I'll have a closer look at both the Pipeworks demo and the Modularity demo. It sounds like pipes aren't what I'm looking for.

What about Fabrication? In a forum posting they mention:

"Instead of sending and receiving messages via the junction.sendMessage and handlePipeMessages, messages are routed as standard PureMVC notifications. To send messages to other modules you call routeNotification. And to receive messages from different modules you simply add the notification name in listNotificationInterests of your Mediator." (http://forums.puremvc.org/index.php?topic=681.msg3047#msg3047)

If you'd care to comment, I'd be very interested in hearing your thoughts on Fabrication. Also, I'm not sure if you know the answer to this question but, am I interpreting the above passage correctly: With Fabrication, do pipes start to behave kind of like notifications?

Last but not least, your comments about modules not reducing my main program size were an eye opener! I had assumed that modules would be a good way of breaking my app into smaller chunks, but it sounds like that is not the case which means I probably won't end up using them in this app. Nevertheless, I'm loving the PureMVC framework so much that I really want to learn it all, so I'll be diving back into both the Pipeworks demo and the Modularity demo for a closer look anyway!

Again many thanks for your replies. -- They've been invaluable!

: )

Jason
2  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
3  PureMVC Manifold / Standard Version / Re: View vs. Mediator: What code goes where? What, exactly, should a View do? on: March 14, 2009, 08:06:12
Thanks Cliff! -- Great clarification.

Much appreciated,

: )

Jason
4  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]