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

Pages: [1]
Print
Author Topic: The difference between the Modularity and PipeWorks Demos  (Read 8561 times)
danielcsgomes
Full Member
***
Posts: 47

 - daniel@onedesign.com.pt
View Profile Email
« on: August 16, 2008, 04:37:11 »

Hi guys,

I am starting now with AS3 Multicore, and i'm facing a problem.
I have a flex library that for now contain a Login Module that is attach to my project. When i loggedin in LoginPanel it sends a notification and my question is what is the best away/practice to make it reusable and without Login Module have to know the main project?

I thought maybe Login Module sending a notification that main project can hear and handle but i don't know if it's possible and if it is who to do it.

Thanks,

Daniel Gomes
« Last Edit: August 16, 2008, 08:10:26 by puremvc » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: August 16, 2008, 05:01:59 »

Use MultiCore and Pipes. This let you send messages between Modules while keeping the code separate.

-=Cliff> 
Logged
danielcsgomes
Full Member
***
Posts: 47

 - daniel@onedesign.com.pt
View Profile Email
« Reply #2 on: August 16, 2008, 05:12:12 »

Hi Cliff, thanks for reply.

I was trying modularity first, until i faced this problem ;) i will see the pipeworks demo and is code and try to understand it. For now exists any topic or article explaning the difference between pipes and modularity?

Thanks,

Daniel Gomes
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: August 16, 2008, 08:09:57 »

What both demos don't do:

1) Demonstrate loading of modules. (Plenty of docs exist elsewhere on this topic).
2) Separate the modules into separate projects. (Just to cumbersome for a demo, but in the real world it's your first big issue).

The goal of the Modularity and PipeWorks demos is to illustrate the two currently recommended ways for Cores* to communicate:

1) Using interfaces. The Cores have references to each other (or it can just be one way), and expect the reference to implement a specific interface. This allows synchronous communications between the Cores, (i.e. you can just call a method and get a response). This is the way Modularity works.

2) Using pipes. Using the MultiCore Pipes Utility, the Cores have Junctions with Pipes connecting them, which are used to send asynchronous Messages back and forth. The Cores need not ever have references to each other or even be in the same ApplicationDomain. This is the basis of PipeWorks.

-=Cliff>


* The term Core refers to the unique set of MVCF actors used by a module or the main application.
« Last Edit: August 16, 2008, 08:12:07 by puremvc » Logged
Pages: [1]
Print