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: Eclipse plugin for pureMVC on: February 12, 2010, 05:49:12
So update here... Flash Builder has support for templates in preferences (including import/export) and it looks relatively easy to implement by editing an XML file. Def not as easy as Flash Develop which just read the file system at startup. If I get a little extra time I'll post here, but below is the XML if anyone wants to take initiative. Pretty easy to follow.

Here's a preview of the structure

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<template autoinsert="true" context="new_actionscript_file" deleted="false" description="Newly created ActionScript file" enabled="true" id="com.adobe.flexide.as.core.filetemplates.new_actionscript_file" name="ActionScript File">// ActionScript file</template><template autoinsert="true" context="new_actionscript_class" deleted="false" description="Newly created ActionScript Class file" enabled="true" id="com.adobe.flexide.as.core.filetemplates.new_actionscript_class" name="ActionScript Class">
2  PureMVC Manifold / MultiCore Version / Re: Eclipse plugin for pureMVC on: January 08, 2010, 06:06:19
I wish it was easier as this would be immensely useful (especially in team environments). Here's a full blown tutorial from IBM


3  PureMVC Manifold / Standard Version / NAME property of Proxies on: November 02, 2009, 12:15:53
I've used PureMVC AS3 Multicore for sometime now and am playing around with C# port.

The Proxy pattern has a public static NAME property with a default value of "Proxy", however after creating an instance of the proxy class (or a subclass) this NAME property is left as its default value.

This means in a command when I want to retrieve a proxy, I must manage my proxy names, where as, if I'm not mistaken, in AS3, the NAME static variable is reassigned in the constructor to reflect a particular proxy instance's given name. In this way I can retrieve a proxy by Facade.RetrieveProxy( MyProxy.Name ).

Is it by design that the static NAME variable is not reassigned in the constructor?
4  Announcements and General Discussion / General Discussion / Benefits and Disadvantages of Un-typed Notification Bodies on: October 12, 2008, 08:54:52
I've been working on a PureMVC/AS3 port multi-core Flex application for about a year and the project has been winding down, so at a recent interview, I touted PureMVC as a great MVC framework.

The company I will possibly be hired to consult is still teetering between PureMVC and Cairngorm. I found myself having to defend and explain several of the architectural elements withing PureMVC. I wasn't completely satisfied with some of my answers...

Can someone explain what are the benefits of un-typed notification bodies and how to combat dis-advantages?

How do others deal with runtime related errors, for example, if a developer passes the wrong object in the body of a notification.

5  PureMVC Manifold / Standard Version / Re: Question. Ideas. on: July 21, 2008, 11:05:57
Okay, I'll have a look. Thanks
6  PureMVC Manifold / Standard Version / Question. Ideas. on: June 16, 2008, 12:24:53
How is the php port related or reliant upon the Zend framework?

I have a use case where I am going to add/extend an open source content management system. I would consider using PureMVC as described below and would be interested to know thoughts/impressions from the readers out there.

Some proxies connect to the CMS's database tables, others connect with another database altogether. Still other proxies might connect to remote web services.

Gets references to proxies, sends notifications.
Also might create/update delete mediators. Change the display/page.

I specifically need to intercept/override the CMS's entire user authentication. A command might get form data from a mediator's notification.

Listen for AJAX requests. Calculate template logic.

HTML/PHP Templates. Some views are invoked directly, while others are called via the CMS's custom theme that will interface the existing view of the CMS with those of the PureMVC-PHP extensions.

7  PureMVC Manifold / Demos and Utils / Re: Pipes - A PureMVC AS3 MultiCore Utility on: June 05, 2008, 03:50:52
One thing I've been noodling about is how to deal with the complexity of managing the message types between cores as the number of specialized cores increases. I currently have 6 cores which are loaded depending upon the privileges of the user.

First we created a class that extends the Message class for each core. However, some cores need to turn around and send a response message, which means that the junction mediator of each core would have to know about several message classes and this quickly got confusing. Instead we're making heavy use of a class that also extends the Message and adds a destination to the header. The destination is also used as the name of dediated core  pipes.

Some of the cores connect to asynchronous web services and when a result is returned in response to query message, we can either send the result with the query response or just notify that data arrived and then implement a robust API for each core.
8  PureMVC Manifold / Demos and Utils / Re: PipeWorks- a PureMVC AS3 MultiCore Demo on: June 02, 2008, 11:34:17
Thanks :)

I must say that the pipes utility is damn cool. I ported some of the ideas from your demo to my application and everyone on my team is very happy with it. We had a few meetings to discuss the pipe messages each core handles and now we're happily on our way implementing again. What I really like is the flexibility and freedom this utility gives. It also helps to fight feature/code bloat. Instead of piling up functionality in a single project, we have several smaller ones that are dedicated to a specific task. We currently have 5 cores including the shell.

While I did go ahead and create a teesplit pipe from the shell to all cores so that general messages can be broadcast, I found it useful to have a dedicated pipe from the shell to each core. Each core has only a STDSHELL pipe for outbound communication so, the shell's junction mediator performs all the message switching.
9  PureMVC Manifold / Demos and Utils / Re: PipeWorks- a PureMVC AS3 MultiCore Demo on: June 01, 2008, 07:22:33
This is an excellent demo. I found a small bug:

Class: org.puremvc.as3.multicore.demos.flex.pipeworks.shell.view.ShellJunctionMediator

When handling the switch case ApplicationFacade.CONNECT_MODULE_TO_SHELL of handleNotification funciton, this line

var shellOut:IPipeFitting = junction.retrievePipe(JunctionMediator.STDIN) as IPipeFitting;
should be

var shellOut:IPipeFitting = junction.retrievePipe(JunctionMediator.STDOUT) as IPipeFitting;

10  PureMVC Manifold / Demos and Utils / Re: Pipes - A PureMVC AS3 MultiCore Utility on: May 28, 2008, 12:30:49
And I did have it backwards. When reading the AS docs I couldn't quite figure out where junctions are managed, in the core or outside of it. I started to get confused and used up half a yellow scratch pad, while writing up some test code. Your comments help a lot.

Still curious to hear your opinion of using junctions in a proxy though...

Here's a use case to help illustrate. Suppose I have a core which models chemical reactions via calculations and data structures. This 'chemical core' needs to talk with two other cores:
  • A 'database core' provides chemical and reaction information.
  • A 'view core' handles the graphical display of the data structures found in the 'chemical core', (is it a blue boiling liquid, or gaseous toxic green vapor)

In this use case a JunctionProxy handles communication with the database core and a JunctionMediator handles communication with teh 'view core'.

11  PureMVC Manifold / Demos and Utils / Re: Pipes - A PureMVC AS3 MultiCore Utility on: May 27, 2008, 01:51:18
Thanks for that write up, it gives a lot of direction on how one might apply the pipes utility. I was completely thinking of this from another perspective, that is, implementing a PipeProxy or JunctionProxy to read and write data services to and from a core, similar to how one would communicate with a web service.

Some of my cores don't have a proper view, however, I can see that the flexibility of a mediator's behavior to both send and express interest in notifications is valuable.

Would you recommend that it is best to communicate via pipes at the mediator level per your example?
12  PureMVC Manifold / Demos and Utils / Re: Pipes - A PureMVC AS3 MultiCore Utility on: May 27, 2008, 03:33:37
I've worked through a simple example to understand this utility. Below I illustrate how to use a junction together with two cores that have a pipe listener to receive messages and a pipe for sending messages.

Conceptually, it took awhile to understand that a pipe used to send message out of a core, is from the junction's perspective coming in

For simplicity, I kept all the code in a single MXML file. Next, I will next need to split up code between two child cores and a main core that creates the junction and is aware of the pipes that each core has.

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage;
import org.puremvc.as3.multicore.utilities.pipes.messages.Message;
import org.puremvc.as3.multicore.utilities.pipes.plumbing.Junction;
import org.puremvc.as3.multicore.utilities.pipes.plumbing.Pipe;
import org.puremvc.as3.multicore.utilities.pipes.plumbing.PipeListener;

                        private var j:Junction = new Junction();

public function pipeTest():void

// Each Core has listeners to receive messages
// Each Core has pipes to send messages
var coreA:PipeListener = new PipeListener( this, coreAGotMessage );
var coreAoutpipe:Pipe = new Pipe();

var coreB:PipeListener = new PipeListener( this, coreBGotMessage );
var coreBoutpipe:Pipe = new Pipe();

// MXML is aware of the pipes coming out of each core and into the junction
                                // declared outside of coreA/coreB
trace( 'Junction.registerJunctionInPipe', j.registerPipe( 'fromCoreA',  Junction.INPUT, coreAoutpipe ));
trace( 'Junction.registerJunctionInPipe', j.registerPipe( 'fromCoreB',  Junction.INPUT, coreBoutpipe ));

// MXML is aware of the pipes going into each core and out of the junction
                                // declared outside of coreA/coreB
trace( 'Junction.registerJunctionOutPipe', j.registerPipe( 'toCoreA',  Junction.OUTPUT, coreA ));
trace( 'Junction.registerJunctionOutPipe', j.registerPipe( 'toCoreB',  Junction.OUTPUT, coreB ));

j.addPipeListener( 'fromCoreA', this, onMessageFromCoreA );
j.addPipeListener( 'fromCoreB', this, onMessageFromCoreB );

// Core B has an outpipe and sends a message via this pipe
coreBoutpipe.write( new Message( 'Hello from core B' ) );

// Core A has an outpipe and sends a message via this pipe
coreAoutpipe.write( new Message( 'Hello from core A' ) );

// MXML handles messages on a pipe and writes them to another pipe
private function onMessageFromCoreA( msg:IPipeMessage ):void
j.sendMessage( 'toCoreB', msg );

private function onMessageFromCoreB( msg:IPipeMessage ):void
j.sendMessage( 'toCoreA', msg );

* CoreA implements this message handler
* @param msg
private function coreAGotMessage( msg:IPipeMessage ):void
trace( 'Core A got message', msg.getType() );

* CoreB implements this message handler
* @param msg
private function coreBGotMessage( msg:IPipeMessage ):void
trace( 'Core B got message', msg.getType() );
<mx:Button label="SendMessages" click="pipeTest()"/>

13  PureMVC Manifold / Demos and Utils / Re: Pipes - A PureMVC AS3 MultiCore Utility on: May 20, 2008, 12:40:18
Thank you very much!

Been working out the details of an application that will take advantage of multicore and this is something we've been struggling to deal with

Pages: [1]