| Subcribe via RSS

PureMVC – Multicore vs Standard / Singlecore

July 23rd, 2008 | 2 Comments | Posted in PureMVC

I’ve recently started using the Actionscript 3.0 Multicore implementation of PureMVC in order to use the framework within a modular Flex application. At the time of writing, most of the PureMVC examples and tutorials online are relevant to the Standard, or Singlecore,  version of the framework.

In general, the methodology and syntax is indentical across both versions of the framework. There are, however, a couple of minor differences which are pretty important, as without understanding these little quirks, many of the sample applications built using the Singlecore implementation will break when ported to Multicore.

The Standard version of PureMVC uses Singletons to provide access to the framework’s core actors. Within the framework, access to the Facade, Model, View and Controller are all provided using a standard getInstance method. To allow multiple instances of the framework to co-exist, the Multicore version of the framework uses Multitons, and then access to the various actors is provided within the framework by passing a unique instance key to the getInstance methods. The idea is simple – each separate instance of the framework has its own unique key, and so multiple instances of the actors may co-exist without interfering with each other.

Continue reading PureMVC – Multicore vs Standard / Singlecore »

Tags: , ,

Discovering PureMVC, and scaling the learning curve

July 21st, 2008 | No Comments | Posted in PureMVC

Background
A while back I began work on a personal project which would involve me finally getting to grips with Flex, Django and XML-RPC. I’ve been using Actionscript 3.0 for quite a while, but my experience with Flex had been relatively minimal. After getting past the initial “What the hell actually is Flex?” thing I spent some time trying to learn the basics.

I started off by going through the Flex Builder tutorials, built the sample application featured in Flex 3 – Training from the Source , signed up for the Flexcoders mailing list and even built a couple of little apps to help me automate some fairly dull database maintenance I’d been putting off. But at that point I’d never done any real work with Flex, and it quickly became obvious that I wasn’t sure where to begin when it came to structuring a fairly large application.

I’d read a bit about the various frameworks available for Flash and Flex, but I’d always kind of written them off as not applicable for me. I had my own way of doing things which, up until now, had always worked well for me and I saw no reason to change. This time, things were a little different,  and I decided that it might be time to revisit them.

Continue reading Discovering PureMVC, and scaling the learning curve »

Tags: , ,