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 / Architecture / Connecting modules on: June 15, 2009, 10:32:42
Hi (again)

My current issue is not so much a problem just a question of which would be the best way of doing something.

I have a shell that loads in a few modules dynamically. each module has the pipefittings to communicate back and forth with the shell. One of the modules is a login module. Once the user is logged in other modules need to get information to display regarding the user - and other modules need the information to later be able to do tasks reserved for registered users.

Currently the way I have this set up is:
- User clicks login and proxy logs user in
- Proxy sends notification with userVO
- LoginModuleJunctionMediator gets note from proxy and sends a message to shell with userVO
- Shell sends message on down the STNOUT pipe to any module interested in the login message

Not sure if the ShellJunctionMediator should send the message on directly when it is received in its pipe message handler or send it on to the Shell Mediator which in turn sends it back to the ShellJunctionMediator which sends it on to the modules (just to keep with the structure)

My question is - does this flow seem like a logical way of doing this or will I end up with spagetti piping and there is a better way to go about this that is eluding me.

2  Announcements and General Discussion / Architecture / Basic Pipes question on: June 08, 2009, 01:43:28

I'm just starting to work with pipes and I've run into a problem that is probably very basic, but the solution is eluding me...

I'm trying to do a simple framework where the shell has three modules and they can send messages back and forth. I used the PipeWorks and GarbageCollectionPipes demos as a base.

I create and connect the modules fine - they show up in the framework and I can send messages from the modules to the shell ( in the MODULE_TO_SHELL_PIPE ) However when i try to send messages the other way ( in the  SHELL_TO_MODULE_PIPE ) it fails. The chain stops when I try to send the mesage:

junction.sendMessage( PipeAwareModuleConstants.APP_TO_MODULE_PIPE, new Message( PipeAwareModuleConstants.APP_TO_MODULE_MESSAGE, null, note.getBody( ) ) );

I can see an Alert that happens before the call, but not after so I'm assuming it fails silently somewhere in the sending process.

I did one thing that might cause this ( can't really see where it would, but I'm a newbie ) - I wanted to be able to load MXML modules and not AS modules so I changed the "PipeAwareModule" to extend "Module" instead of "ModuleBase". Then I added a public "init" function that is overridden by modules extending "PipeAwareModule". I also added a "setFacade" since the MXML module does not have a constructor where it can pass that to super. This all happens before i try to connect the module to the Pipes so the facade is available when the ACCEPT_INPUT_PIPE and ACCEPT_OUTPUT_PIPE notifications are sent.

This might be the totally wrong way to approach this - and I'm very open to suggestions - but it seems to connect fine since I can send messages from the modules to the shell. (But not the other way around...)
Sorry for the lengthy explanation - if anyone has experienced anything similar, or see something inherently wrong with what I've tried to do I'd really appreciate any help I can get

3  Announcements and General Discussion / General Discussion / MultiCore load module into another module issue on: April 07, 2009, 05:56:20

I'm having a frustrating problem with loaded modules:

In my application I load modules into other modules at run time. All modules are loaded using the module manager and everything loads fine. The problem happens with any outbound notifications originating from the modules loaded at run time into another module - they are being sent twice.

If the same module is loaded into the main shell instead of into another module the notifications behave as expected.

I know there isn't much info to go on - and no source code, but if it sounds familiar I'd really appreciate if anyone has experienced a similar problem and found a solution.

Pages: [1]