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 / Re: How much does PureMVC add to SWF filesize on: November 10, 2008, 03:02:25
Thanks Cliff. Didn't know that. cool feature indeed.
Cheers for info.
2  Announcements and General Discussion / Architecture / Re: singletone pattern implementation - what for? on: November 07, 2008, 09:44:37
Thanks. Looks interesting. Will have a look into it, however personaly recomended wikipedia as good start for newbies:
http://en.wikipedia.org/wiki/Design_pattern_(computer_science)

3  Announcements and General Discussion / Getting Started / Re: AppSkeleton not conform FAQ? on: November 07, 2008, 08:14:25
interesting...
4  Announcements and General Discussion / Architecture / Re: How much does PureMVC add to SWF filesize on: November 07, 2008, 08:11:29
was 21kb for me however I put some extra functionality. to be honest have a problem to understand how compilator manages internal imports. Curious that larger number of internal imports makes app size much bigger or not really. From my experience I just learn to use:

:
import package.subpackage.classA
import package.subpackage.classB
import package.subpackage.classC

instead of

:
import package.subpackage.*
check your code once you done and compare. For me it saves some kb every time I do clear my code.
5  Announcements and General Discussion / Architecture / Re: singletone pattern implementation - what for? on: November 07, 2008, 08:01:21
Cheers. I am spending more and more time on this formum and within documentation but still feel that need to learn. Whole pureMVC conception is what lot of people looking for but it is almost impossible to master technics within one week and more I understand more hungry I am :)
6  Announcements and General Discussion / Architecture / Re: Commands calling mediators/proxies in timed sequence on: November 07, 2008, 07:36:35
Am I allowed to have the command call the view for an example with TweenLite.delayedCall()?
for sure command shouldn't call the view but just send notification. Observer will respond with view right action inside the view. TweenLite can be used - that is not a problem even with delayedCall however I do believe that all transition functionality should be stored within the View. Mediators react for received notifications that can carry a object contains transition sequence. That is my solution.

If you want to take them down one by one... hmm....
you might create a function that will be called everytime one of them has been removed or tweened. You can fire it using
:
TweenLite.delayedCall(delay:Number, onComplete:Function, onCompleteParams:Array):TweenLite
Function will check if there any objects left - all available in the conatainer or within array that can store it. If yes will take another from the stage or list you predefined and perform expected action. My feeling is to keep it simple but not too much. ;)
7  Announcements and General Discussion / Architecture / Re: ONE PROXY, TWO VO´S on: November 07, 2008, 07:24:08
Hi guys.

Got similar problem some time ago and did use 3 diferent VO sending to my GameProxy that provides me a configuration for whole application.
Becouse I was migrating to pureMVC from old version of these application didn't want to create 5 separate proxies. Whole config contains sets of data that came from diferent places. Data is used across whole application so I did grouped it and and now access it by:

first retrieving a proxy
:
var gameProxy: GameProxy;
gameProxy = facade.retrieveProxy( LoginProxy.NAME ) as LoginProxy;
and then simple:
:
gameProxy.stage;and diferent group (internal object):
:
gameProxy.config.url;
gameProxy.config.assetsURL;
gameProxy.config.gatewayURL;
gameProxy.config.sessionURL;
gameProxy.config.serviceName;
gameProxy.config.loaderinfo;
and next one:
:
gameProxy.acc.loggedin;
gameProxy.acc.accountid;
gameProxy.acc.lastactionid;

etc...
the VO objects are strored in app.model.common.vo
8  Announcements and General Discussion / Architecture / Re: Where to put a Timer within a PureMVC Application on: November 07, 2008, 07:02:51
Based on my understanding of pureMVC architecture I do agree with jasonmac. I was struggling with similar problem at the beginning there for can see few possible solutions.
1.   Timer could be a integral part of proxy and could be start/stop by command depending on view behaviour for different part of application. Let’s say you have a rss reader component that allows you to switch between feeds and personalize timer delay. That option works for me if I wish my proxy instance to send a notification with data to my view every period of time.
However…
2.   Also reasonable it seems to create timer within the view and send notification for update a view every period of time especially if you wish to have additional view behaviour fired like small preloader every   time you ask for new data. That approach also doesn’t force you to send notification to the proxy once view “is closed” by user. You just need to make sure that you remove timer ‘on close’
3.   Another option  that might work for me is to create TimerProxy that could handle lot of different actions depending on dataflow, user or other actors behaviour based and public fields that could be modified externally. That seems be quite good approach if you wish to keep all sending notifications related to your timer in one place.

I am not sure that my ideas are good enough. I am new pureMVC user as well so still learning. However If I understand your problem… XMLDataProxy seems to be cool place to have a timer itself it is just a simple application. ^^
9  Announcements and General Discussion / Architecture / Re: singletone pattern implementation - what for? on: November 07, 2008, 06:40:50
Thanks Cliff!

Makes sense and it is fair enough. Didn’t mean that it is incorrect but was wandering is it really necessary or it is just a proper behaviour. I am working with design patterns since some time however more I do more questions I have. For last couple of days I feel a bit like a lack of knowledge, therefore ‘Design Patterns: Elements of Reusable Software’ is already ordered.

Cheers and sorry if it was not appropriate question. Was trying to look for a answer on this forum but just couldn’t manage to do it so thought it is right place to ask.
10  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
11  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?
12  PureMVC Manifold / Standard Version / Re: Does mediator sendNotification to proxy or they can call directly ? on: September 26, 2008, 04:58:56
Need to say that it took me some time to understand it,
so just to make clear

 ---------------------------+----------+---------+
 |   - actor -              |  send    | receive |
 ---------------------------+----------+---------+
 |  view (mediator)         |   yes    |   yes   |
 ---------------------------+----------+---------+
 | controller (commands)    |   yes    |    yes  |
 ---------------------------+----------+---------+
 | model (proxies)          |   yes    |    no   |
 ---------------------------+----------+---------+

Is it better to send notification from view or better to call command that will do that? What is better habit?
13  PureMVC Manifold / Demos and Utils / Re: StartupManager - A PureMVC AS3 Utility on: September 26, 2008, 04:35:45
I tried to use StartupManager with swc files downloaded directly from SVN. Works fine. However if I'm using it with original source code included into packages got a problem with:
:
_monitor.defaultTimeout = 30; - sets in StartupCommand from example
:
StartupMonitorProxy.LOAD_RESOURCES_REJECTED - from StageMediator

Could you guys please check final 1.4 tag on SVN and just make sure that AS3 code = .swc files?
14  PureMVC Manifold / Standard Version / Re: First real project with puremvc : is my plan good ? on: September 26, 2008, 04:25:06
not alone. I have been almost everywhere but just joined so will try to put my fingers into it. I like the idea of having common library that can be used by both front and back end. Someone in the company I work has created common lib for all projects. It is kind of cool and work fine as long as you don't use SVN without proper tagging and branching.
Pages: [1]