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 / 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
2  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

3  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
4  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]