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 / Getting Started / Re: Should a view component retrieve it's own assets? on: April 20, 2010, 09:01:40
Thanks for the advice, I feel like I'm finally getting up to speed on the framework...

b
2  Announcements and General Discussion / Getting Started / Re: Should a view component retrieve it's own assets? on: April 19, 2010, 10:51:20
Thanks for the advice, the assets I'm referring to are indeed images that are strictly applicable to only the view component. So I pass in a list of url's, or a url and have the view component both get them and place them - then custom events handle the rest to inform the mediator what's going on.

b
3  Announcements and General Discussion / Getting Started / Should a view component retrieve it's own assets? on: April 19, 2010, 07:18:40
As the subject suggests, I have some view components that need visual assets for rendering - is it acceptable for these to do the actual loading of these assets themselves based on a value object of url's passed in?

Thanks in advance -

b
4  Announcements and General Discussion / Getting Started / Re: Command setting data 'source' on proxy? 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
5  Announcements and General Discussion / Getting Started / Re: Command setting data 'source' on proxy? 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

6  Announcements and General Discussion / Getting Started / Re: Newbie Flash project starting setup with XML config loading - logic check on: April 17, 2010, 06:12:51
Hi -

My document base class 'App' is passed as the body of the notification and handed over to the constructor of the ApplicationMediator.

b
7  Announcements and General Discussion / Getting Started / Command setting data 'source' on proxy? 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

8  Announcements and General Discussion / Getting Started / Re: Beginner question about best practices for view component on: April 16, 2010, 05:25:50
A little more info - from reading other forum posts i've found, it seems I should not be creating my view component in the mediator constructor, but on the onRegister at which time I could pass the data retrieved from the proxies, therefore removing the need for the extra 'renderContent' method.

?
b
9  Announcements and General Discussion / Getting Started / Beginner question about best practices for view component on: April 16, 2010, 04:17:10
Hi -

I have a beginner view question as I dive through PureMVC....

I'm working in a Flash environment and as such my mediators actually create their viewcomponents themselves in their constructor. However, in an effort to keep my view components from knowing anything about PureMVC I find myself always creating empty viewcomponent constructors - then adding a 'renderContent' type method that I call from the onRegister of the mediator and have to pass in a great deal of info to my view component (stylesheets, messaging strings, configuration details etc). I have a nagging feeling there is a better way??

To recap:

+ View mediator is created and registered in a command.
+ View mediator creates it's view component in the constructor.
+ In the onRegister of the mediator, I retrieve several proxies (site configuration, stylesheet, etc) and then pass some values from these proxies in to a 'renderContent' method that then draw the contents of the view.
+ View component is added to stage via notification to an application mediator.

Is there a better or more accepted way to draw the components yet keep them from touching the framework themselves?

Thanks in advance!

b
10  Announcements and General Discussion / Getting Started / Re: Newbie Flash project starting setup with XML config loading - logic check on: March 10, 2010, 01:54:31
Thanks so much - you're activity on the forums and in general with help was a major part of my decision to use this framework. I appreciate the work and attention!

b
11  Announcements and General Discussion / Getting Started / Newbie Flash project starting setup with XML config loading - logic check on: March 10, 2010, 01:00:58
Hi all - I'm just diving in to PureMVC for actionscript projects and I have read through the forums and best practices document. Below is the way I have structured the beginning 'skeleton' of a Flash IDE based project and I was hoping to just get a quick check on whether I'm doing this correctly.

+ In my flash document class I get an instance of the facade and call the startup method passing in the document class itself.

+ My startup command registers a configuration proxy that upon registration retrieves an xml document with configuration settings and exposes these via a typed getter to a 'smart' value object that wraps the xml in typed getters via ex4. and then sends an APPSETTINGS_LOADED notification when done.

+ A PrepApplicationCommand was registered initially with the facade to listen for this notification which is a macrocommand that executes a PrepModel and PrepView command.

+ My PrepModel command will register the proxies that I will need, but not actually load data until explicity requested by the application at a later stage.

+ The PrepViewCommand registers an ApplicationMediator passing in the type document class as the object for mediation. (will eventually register other mediators of course)

Is this a sound beginning to a Flash based application, or have I overlooked something in the basic setup and beginnings?

Thanks in advance for your time...

b
Pages: [1]