puremvc
|
 |
« on: February 17, 2008, 12:53:27 » |
|
This demo illustrates the use of the PureMVC framework, the Startup Manager Utility, and the Asynchronous Stub utility to orchestrate an ordered startup process, where Model resources must be loaded in a specific order. The demo is located here: http://trac.puremvc.org/Demo_AS3_Flex_StartupAsOrderedThe author is Philip Sexton. NOTE: This project is now known as LoadupAsOrderd, and was renamed when StartupManager was renamed Loadup, to dispel the notion that the utility it was only usable at startup time. The new thread is here: http://forums.puremvc.org/index.php?topic=1396.0
|
|
« Last Edit: August 16, 2009, 07:21:53 by puremvc »
|
Logged
|
|
|
|
Flamaker
|
 |
« Reply #1 on: April 28, 2008, 11:10:35 » |
|
Great demo that illustrates the two utilities working together. Is there an easy way to mock/simulate loaded objects and their loading status?
|
|
|
Logged
|
|
|
|
philipSe
|
 |
« Reply #2 on: May 07, 2008, 03:36:08 » |
|
Is there an easy way to mock/simulate loaded objects and their loading status?
I presume you mean by using AsyncStub. I haven't focussed on this use, though I can see how one would think that would be an obvious use for it. Whether it is a good fit for this purpose, in practice, is a good question. ----Philip
|
|
|
Logged
|
|
|
|
philipSe
|
 |
« Reply #3 on: May 07, 2008, 03:40:08 » |
|
By the way, if there are further postings that relate particularly to AsyncStub, it would be best to post them under the AsyncStub topic. ----Philip
|
|
|
Logged
|
|
|
|
log2e
|
 |
« Reply #4 on: May 19, 2008, 02:43:49 » |
|
I put together a three-parts tutorial on using the PureMVC Startup Manager. The tutorial reflects my own learning experience with the PureMVC framework and the PureMVC Startup Manager. It was inspired by Philip Sexton’s demo Startup as Ordered and is my first attempt on PureMVC. Getting Started with the PureMVC Startup ManagerIntroductionPart 1Part 2Part 3
|
|
« Last Edit: May 19, 2008, 02:50:45 by log2e »
|
Logged
|
|
|
|
philipSe
|
 |
« Reply #5 on: May 23, 2008, 02:42:12 » |
|
Well done with the tutorial. It's great that you've taken the time to hand on the benefits of your own experience in this way. ----Philip
|
|
|
Logged
|
|
|
|
harmanjd
|
 |
« Reply #6 on: June 05, 2008, 10:28:07 » |
|
Question about the tutorial:
In part 2 you have made the statement:
Lines 33-37: The before mentioned utility commands are registered. It’s important that the commands are registered separately with the “Loaded” and “Failed” notification names for every single startup resource.
Why is it important that there are different notification names for every startup resource?
|
|
|
Logged
|
|
|
|
log2e
|
 |
« Reply #7 on: June 05, 2008, 11:46:08 » |
|
harmanjd: Otherwise you won't be able to monitor which resource did well and which one did not.
|
|
|
Logged
|
|
|
|
harmanjd
|
 |
« Reply #8 on: June 06, 2008, 07:13:16 » |
|
But - the notifications carry the resource name in the body.
|
|
|
Logged
|
|
|
|
puremvc
|
 |
« Reply #9 on: June 08, 2008, 07:20:51 » |
|
Version 1.5 of the Startup As Ordered demo is now available for download. Peter has added some nice functionality allowing you to modify the default properties (such as max retries) before running.
-=Cliff>
|
|
|
Logged
|
|
|
|
philipSe
|
 |
« Reply #10 on: June 09, 2008, 03:17:53 » |
|
Major point... This release of StartupAsOrdered requires the latest version of the StartupManager utility, i.e. it will not work with version 1.2 of StartupManager. That latest version of StartupManager has not yet been tagged for official release.
Minor point... Just to avoid confusion. let me clarify that Cliff means 'Philip' not 'Peter'; for some reason this naming error with Philip is a common occurrence among people in general - sometimes Peter is used, sometimes Paul is used.
----Philip
|
|
|
Logged
|
|
|
|
puremvc
|
 |
« Reply #11 on: June 09, 2008, 06:21:40 » |
|
Sorry about that Phillip. I'm starting to get a little scatter-brained with everything going on.
And I will get the util bagged and tagged today.
-=Cliff>
|
|
|
Logged
|
|
|
|
justSteve
|
 |
« Reply #12 on: June 19, 2008, 05:06:32 » |
|
A couple questions about the updated version as regards the open-ended resource list feature...the 'open-endedness' is meant to accommodate those resource lists where contents are generated at runtime?
On one hand, it seems like either SalesOrder or Invoice would fall into that category - one customer : many invoices. But wouldn't then the proxy have code that first discovered how many invoices/orders are to be loaded and then begin the loading process?
thx --steve...
|
|
|
Logged
|
|
|
|
philipSe
|
 |
« Reply #13 on: June 19, 2008, 07:36:42 » |
|
Yes Steve, I'm sure one could interpret the role of these entities in that way. The key point was that I didn't choose to put any further effort into the demo, to have it illustrate any more of the startup manager features.
The only reference to the open-ended resource list feature is the block of code commented in the LoadResourcesCommand class. I included this just as an illustration of how to use this feature and so that a developer could easily activate it instead of the standard code and thus rebuild the demo and see the altered execution.
Of course the option is there for somebody to enhance the demo or make a different demo. ----Philip
|
|
|
Logged
|
|
|
|
justSteve
|
 |
« Reply #14 on: July 07, 2008, 03:09:34 » |
|
I'm trying to implement StartUpAsOrdered under the MultiCore model...I've swapped out the 2_0_1.swc for the MultiCore_1_0.swc and updated all imports so they point to the correct package.
I've also updated the getInstance method to use the multicore version: public static function getInstance( key:String ) : ApplicationFacade { if ( instanceMap[ key ] == null ) instanceMap[ key ] = new ApplicationFacade( key ); return instanceMap[ key ] as ApplicationFacade; }
The project tosses 5 different 1046 compiler errors without pinpointing what class(es) are the cause:
1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::ICommand. StartupAsOrdered Unknown 1215423380250 6951 1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::ICommand. StartupAsOrdered Unknown 1215423380250 6952 1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::IProxy. StartupAsOrdered Unknown 1215423380265 6953 1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::IProxy. StartupAsOrdered Unknown 1215423380281 6954 1046: Type was not found or was not a compile-time constant: [org.puremvc.as3.interfaces]::IProxy. StartupAsOrdered Unknown 1215423380312 6955
I've double checked that any class implementing either ICommand or IProxy is, in fact, importing the multicore package - for grins I've re-added the standard 2_0_1.swc and now get different compiler errors. Since I changed no source code at all - just added the original swc back to the lib folder - it looks like perhaps the StartupManager utility might have dependency on the standard version?
|
|
|
Logged
|
|
|
|
|