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 / Registering Multiple Instances of one Mediator and Proxy 2-application behaviour on: November 07, 2008, 06:34:32
Guys! Thanks for that all posts in topic:
http://forums.puremvc.org/index.php?topic=596.0

It solves some problems for me as well however not all of  them.
I am not sure that my approach is correct however It works so far so will try to explain the problem.

I am busy with building AS3 games framework that apart of standard config.xml files makes some calls to middleware (Fluorine). 

I created DataManagementCommand that is triggered by different notifications and depending on notification name run other commands and/or send appropriate notification to mediator and/or proxies.
This approach helps me to keep list of configurable behaviours in one place that can be easily accessed and modify if required.

I don’t  know what calls will be made for different games in future I prepare base class supports different calls based on passing params.

:
public function MiddlewareCall(fMethodName:String, fGatewayURL:String, fServiceName:String)
{
/*...body */
}

:
public function createCall(...args) : void
{
/*
 …body
 with dynamic vars passing into call method 
*/
_RS = new RemotingService(this._gatewayURL);
/* … */
args.unshift(this._serviceName + "." + this._methodName);
_RS.call.apply(this, args);
}

To pass them and create remoteCallProxy object I do:

:
facade.registerProxy( new MiddlewareCall (methodName, gatewayURL, serviceName));
and  then after proxy is retrieved

:
methodName.createCall(param1, param2, …, paramN);
Really like passing ID conception. Works fine for me but now I am thinking how to create dynamic support within DataManagementCommand
When I do register proxy also would like to pass notification name to send or another command to trigger after response received.
It is not a big problem however requires constant modifications of DataManagementCommand. I believe that more handy would be if within this class I will put functionality to manage application behaviour (and change its name to  BehaviourCommand) dynamically based on data accessed from (additional) BehaviourProxy. That proxy could be modified each time there is new remoteCallProxy is registered as a proxy within application façade.
That way I will automate the whole process a bit more and still can keep different application behaviour reaction in one command that is triggered by different notification sending from proxies every time part of data loading is finished.

I am very interested in any thoughts
I am not sure this is all clear enough, therefore please ask to clarify if any questions.
cheers
2  Announcements and General Discussion / Architecture / singletone pattern implementation - what for? on: November 07, 2008, 05:33:32
I have just been thinking...
Why actually Singletone has been implemented. Just cant get this point. I sucessfully started using pureMVC but to be honest I believe that if I remove that pattern from the core of PureMVC It will not affect my apps.
I do understand that main role of singletone is to protect from multiple instances creation - but this is like implementing that for command that should be run only one time. Why anyone possibly wants to start another application facade...

I might be missing the point but could someone explain that for me please?
Pages: [1]