Strongly typed messages are used to communicate between cores in PureMVC MultiCore application with Pipes Utility. Below is a simple example of a custom pipe message class, and a JunctionMediator using the custom message. Message names are defined in the message itself which makes the message handling very easy.
ContactMessage.as
I created and slightly modified Lockable Door application mentioned in StateMachine presentation by Cliff Hall. Application have 3 states OPENED, CLOSED and LOCKED, makes use of entry, exit guards and also sends CHANGED annoucement(notification) for specific(CLOSED) state. This demo is great for beginners learning PureMVC StateMachine Utility.
View demo, source code, fsm diagram
Below you can see what’s happening when transition between states occurs. First your application sends a StateMachine.ACTION Notification that triggers the StateMachine to begin a transition. Any state specific exiting or entering guard(Commands or Mediators) defined for the current and target state are notified. If transition is not cancelled the current state is changed to the target state and any state specific CHANGED annoucement is sent. And finally a generic annoucement of the CHANGED is sent.
Continue reading ‘Transition between States in PureMVC StateMachine Utility’ »
This example is implemented using PureMVC and demonstrates how to load dynamically, connect and communicate Modules that have been implemented using the PureMVC framework.
GreenModule communicates with BlueModule directly through pipe(no need for sending messages to Shell/Application and from Shell back to the Module). The same happens for BlueModule-GreenModule communication, messages are sent through pipe.
View and study Source Code
Live Demo
I had a hard time to understand Flex/PureMVC-Multicore version with Pipes utility especially when simple demos on the web use TeeSplit and Pipe to connect single module to application (diagram at the top-left). It didn’t really make sense to have TeeSplit for only one Pipe/Module. It makes more sense to add Tees(TeeSpit, TeeMerge) only when you go to the next level of having the application collaborate with multiple modules (diagram at the bottom).
Jump into code

Model(Proxies) contains the data and business logic.
View(Mediators) presents the user interface components.
Controller(Commands) handles the user input and manipulates the model.
Read short description and examples
I decided to take my flex development to the next level and learn PureMVC framework in a week.
I will be:
- studying framework documentation.
- reading blogs, tutorials and forum posts.
- learning from source codes.
See my bookmarks, notes etc.