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
|
Pages: [1]
|
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
|
|
|
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
|
|
|
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
|
|
|
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
|
|
|
|
|
|