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: Command setting data 'source' on proxy?  (Read 7502 times)
WillyCornbread
Jr. Member
**
Posts: 11


View Profile Email
« on: April 16, 2010, 05:38:52 »

Hi - another beginner question,

Is it okay for a command to pass the source of data to a proxy? I have a startup type command that uses a bulk sequential loader to get a few different configuration files, etc that are needed for application startup. The command loads the assets, then when all are complete, creates and registers a few proxies, passing in their XML data to the proxy constructor.

The proxy constructor takes the XML, creates some smartVO's and sets them as the data for the proxy.

Am I on the right track?

Thanks again for any advice, I'm building a fairly complex app as my first foray into PureMVC and want to make sure I am at least close to best practices as I become more comfortable.

thanks in advance -

b

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



View Profile WWW Email
« Reply #1 on: April 18, 2010, 04:02:06 »

Don't use Commands to do service operations, that's Model tier stuff. Do it inside the Proxy or a Delegate invoked by the Proxy if you feel the need to create one.

You might want to have a look at the Loadup utility which is good for this sort of thing.

-=Cliff>
Logged
WillyCornbread
Jr. Member
**
Posts: 11


View Profile Email
« Reply #2 on: April 18, 2010, 04:44:48 »

Thanks for the response, I'm really struggling with this piece of my app. I started to look into the Startupmanager/Loadup utility but I was unable to find docs or examples that gave me a clear picture of how to use it. (That I could wrap my head around)

I'll look further - if you know of a simple example I'd love to take another look.

I'm simply trying to get all of the assets I need for application startup loaded without resorting to chaining commands and notifications as they are loaded.

Thanks again for your activity on this forum -

b

Logged
WillyCornbread
Jr. Member
**
Posts: 11


View Profile Email
« Reply #3 on: April 18, 2010, 04:46:56 »

Of course immediately after I posted my reply, I found the tutorial located at: http://blog.log2e.com/2008/05/19/getting-started-with-the-puremvc-startup-manager-introduction/ . I'm not certain how I missed this before, but it seems like enough to get me going with the utility.

Thanks again,

b
Logged
Pages: [1]
Print