Handling FlashVars in PureMVC
Wednesday, August 13th, 2008In this blog entry I would like to share my approach to handling FlashVars in a PureMVC application. I assume that you are familiar with the basic concepts of PureMVC.
In this blog entry I would like to share my approach to handling FlashVars in a PureMVC application. I assume that you are familiar with the basic concepts of PureMVC.
This three-parts 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. The tutorial’s goal is to provide beneficial information to other novice PureMVC users who have understood the theory but lack practice.
(more…)
We are almost there. In the final step of this tutorial we will be creating a very simple view:
A PureMVC-based application typically has a startup command that instantiates some basic proxies and mediators. In our sample project we want to load a CSS stylesheet and an XML file with content before allowing any user interaction (see part 1). The important thing here is to make sure that everything gets loaded in the proper order and is fully loaded before it is accessed. Here is where the StartupMonitorProxy steps in. This class is at the core of the Startup Manager utility.
(more…)
Coming from a Flex/Cairngorm background, I’ve always missed a utility that takes care of the asynchronous loading of resources during application startup. Being too lazy to write one myself, I usually chain together several Cairngorm commands for loading configuration settings, stylesheets, language resources and initial data from a database. Each command is only executed if the predecessor task has been finished successfully. The user interface isn’t initialized until the whole chain is completed, otherwise an error message is generated and the application won’t start. It’s not elegant but it works.
When I started to learn PureMVC (and I’m still learning), I was happy to discover that the AS3 version is accompanied by a Startup Manager. This utility isn’t part of the core PureMVC framework and has to be downloaded and installed separately, but it nicely integrates with the “PureMVC way of things”.
(more…)