Flash application frameworks

3 views
Skip to first unread message

Andrew Bateman

unread,
Feb 18, 2008, 4:11:47 PM2/18/08
to Flash Aussie
Hi all, I am approachng a couple of large-ish Flash projects. I am
considering ARP or hacking in some Flex classes and using Cairngorm.

Does anyone have any good/bad experiences they would like to share
regarding using either of these frameworks in Flash, or any
recommendations on other frameworks to look at?

Andrew

Bill Lane

unread,
Feb 18, 2008, 4:44:42 PM2/18/08
to Flash Aussie
We spent quite a bit of time considering PureMVC and it has a lot of
excellent features. If you are already familiar with Cairngorm it
probably makes sense to go that way but if you are starting form
scratch then I think you might find PureMVC a neater solution. In the
end we chose Cairngorm because the differences between it and PureMVC
weren't significant enough (for a non-purist), we were already
familiar with Cairngorm (from workshops and reading) and Cairngorm has
a larger community.

If it's a largish project that will benefit from some Flex classes you
might be better off building it in Flex as it's a lot easier to use
Flash classes in Flex than visa versa.

Bill Lane

On Feb 19, 8:11 am, Andrew Bateman <andrew.bate...@newgency.com>
wrote:

EG

unread,
Feb 18, 2008, 5:25:35 PM2/18/08
to Flash Aussie
Hi Andrew,

I've built a number of Flash and Flex Applications using the Cairngorm
framework and have not had any issues with implementing this as a
framework solution. I've used ARP before but definately prefer
Cairngorm as the framework of choice.

As Bill said if you're looking at building a Larg-ish application it
may be worth considering flex. Combined with Cairngorm it makes short
work of data integration and can save you some time.

Cheers
Ben Yee

On Feb 19, 8:11 am, Andrew Bateman <andrew.bate...@newgency.com>
wrote:

ric...@gmail.com

unread,
Feb 18, 2008, 5:45:07 PM2/18/08
to Flash Aussie
Hi Andrew,

I've always used Cairngorm until recently. I looked at ARP a while ago
but it felt like a step backwards. Recently I've been moving to
PureMVC, and I have to say it's been great. It feels very consistent
and well structured. One other important thing to note is that the
documentation available for PureMVC is by far the best, which makes it
much easier to learn.

Cheers

Phil Douglas

On Feb 19, 8:11 am, Andrew Bateman <andrew.bate...@newgency.com>
wrote:

Robin Hilliard

unread,
Feb 18, 2008, 6:15:12 PM2/18/08
to flash...@googlegroups.com
Hi Andrew,

RocketBoots have always used Cairngorm for both Flash and Flex
projects - here is a presentation about MVC and Cairngorm I did at
WebDU last year that may help:

http://onair.adobe.com/blogs/videos/2007/05/01/webdu-easy-as-mvc-
architecture-and-frameworks-for-non-believers-robin-hilliard/

Cheers,
Robin

Robin Hilliard

CEO - RocketBoots Pty Limited
Consulting . Recruitment . Software Licensing . Training
http://www.rocketboots.com.au

switch +61 (0)2 9323 2500
fax +61 (0)2 9323 2501
direct +61 (0)2 9323 2507
mobile +61 (0)418 414 341
email ro...@rocketboots.com.au

Bjorn Schultheiss

unread,
Feb 18, 2008, 6:30:57 PM2/18/08
to flash...@googlegroups.com
I'd would be difficult to hack-in Flex classes.
If you feel you can make use of the Flex component framework, go for
it. Build your project using Flex.

I read an interesting article recently on choosing between Flash and
Flex here,
http://theflashblog.com/?p=334

If you are building your application in Flash with language are you
using ? AS2 or AS3 ?

Gaia Framework seems to be a supported flash application framework.
http://www.stevensacks.net/gaia/

regards,

Bjorn

Andrew Bateman

unread,
Feb 18, 2008, 7:02:00 PM2/18/08
to flash...@googlegroups.com
I am not sure exactly what technologies I will be dealing with yet.

Depending on client requirements, we may be stuck using AS2, in which case it would be done in Flash.

If we can go to AS3, it will likely be a mixture of Flex and Flash.

In any case there will likely be independent drop-in components which will need to be of lighter weight than the Flex framework allows.

I am looking for something lightweight that could be easily be used across AS2/AS3/Flex.

Andrew

Robin Burrer

unread,
Feb 19, 2008, 11:15:25 AM2/19/08
to flash...@googlegroups.com
Hi Andrew,

Cairngorm is a flex framework. Even-though Robin Hilliard has used Cairngorm for flash apps there is no AS3 implementation for Flash. At least as far as I know. :-)
I wrote a pure very lightweight AS 3 application framework, which I currently use In one of my flash apps. The framework is very similar to Cairngorm. Actually is has pretty much the same structure.

I'm pretty busy at the moment but I should be able to share the source and post a "hello world" example by the end of the week in case you are interested.

Robin


>>Hi Andrew,

>>RocketBoots have always used Cairngorm for both Flash and Flex
>>projects - here is a presentation about MVC and Cairngorm I did at
>>WebDU last year that may help:

>>http://onair.adobe.com/blogs/videos/2007/05/01/webdu-easy-as-mvc-
>>architecture-and-frameworks-for-non-believers-robin-hilliard/

>>Cheers,
>>Robin


winmail.dat

Andrew Bateman

unread,
Feb 19, 2008, 4:48:00 PM2/19/08
to flash...@googlegroups.com
Thanks Robin that would be great!

Andrew

ric...@gmail.com

unread,
Feb 19, 2008, 8:24:54 PM2/19/08
to Flash Aussie
Hi Robin

There's nothing to stop you using Cairngorm with AS3 Flash
apllications. The code is exactly the same, you just have to update
your views manually (I do this in my commands after updating the
model) as you have no data binding, but this is the same
with AS2.

This is another reason to use PureMVC, as it takes care of this with
its mediators (view) listening for proxy (model) notifications.

Cheers.

Phil
> winmail.dat
> 4KDownload

Bjorn Schultheiss

unread,
Feb 19, 2008, 9:34:52 PM2/19/08
to flash...@googlegroups.com
> There's nothing to stop you using Cairngorm with AS3 Flash
> apllications.

Not true,

Cairngorm does have Flex Framework specific dependencies in it.
Do a search for "mx" in your Cairngorm source.

ric...@gmail.com

unread,
Feb 19, 2008, 10:18:54 PM2/19/08
to Flash Aussie
Well shut me up. :P

On Feb 20, 1:34 pm, Bjorn Schultheiss <bjorn.mailingli...@gmail.com>
wrote:

Robin Hilliard

unread,
Feb 20, 2008, 12:11:07 AM2/20/08
to flash...@googlegroups.com
On 20/02/2008, at 1:34 PM, Bjorn Schultheiss wrote:
>
>> There's nothing to stop you using Cairngorm with AS3 Flash
>> apllications.
>
> Not true,
>
> Cairngorm does have Flex Framework specific dependencies in it.
> Do a search for "mx" in your Cairngorm source.

Well, that's true, but all the dependencies are up in the
ServiceLocator, they're only there to help you use the Flex versions
of the various service types - you would obviously just use the
corresponding service classes available to you in Flash (remote
objects, web services, http stuff, sockets etc) and write your own
service locator (a 5 line singleton, just like model locator). You
don't have to use every Cairngorm class in a Cairngorm app, just the
ones that are applicable to your application. Flash apps don't use
Flex services.

I'm on the public record saying that I'd rather people understood the
MVC pattern and didn't use Cairngorm than the other way round, but at
the same time I have to say that 99% of the time the reasons people
give for not using Cairngorm don't really make sense to me, e.g
someone mentioned to me recently:

"Cairngorm is too complex, I cut it down to make a more efficient
framework"

Cairngorm is really a very, very small code base - if you took the
(copious) comments and spaces out you could probably print it out in
six pages. The reason so many MVC frameworks are so similar is that
there really aren't that many variations on how to do it. Most of
the things I've heard people "simplify" are perfectly doable while
using Cairngorm, and occasionally the "simplifications" are throwing
out important aspects of the MVC pattern - nullifying the advantage
of the framework.

There are now millions of lines of code written in Cairngorm
applications around the world. If you can find an experienced Flex
developer to hire (we have some available at the moment ) then it's
very likely they have already worked with Cairngorm - these are not
inconsiderable advantages.

Lastly, if you're giving an opinion about frameworks, I think you owe
it you your readers to tell them whether or not you've used the
framework in a production application. If you're seeking the opinion
of others about frameworks, I'd be looking for people who have
developed multiple production applications using those frameworks.

Cheers,
Robin

PS: Whoever made the comment about bad documentation, have you read
the code comments or visited the Cairngormdocs site?

ric...@gmail.com

unread,
Feb 20, 2008, 12:49:12 AM2/20/08
to Flash Aussie
"Whoever made the comment about bad documentation"

That would have been me. This was more a throwback to when i was
trying to learn Cairngorm and the documentation at the time was really
hard to get started with. A freind of mine I spoke to recently
mentioned that people who have been using Cairngorm for a while tend
to use it in different ways.

It is however much better now, and i think newcomers have an advantage
in that the documentation on best practices for implementation are
easier to follow. I still think the documentation on PureMVC is much
easier for someone getting started with the framework, but not by
much. That said we still train our staff, and develop our current
eLearning apps in Cairngorm, we're just looking into moving to PureMVC
for full production at the moment, but i've done a some freelance apps
with it, and its been great to work with. (i'm even going to take the
plunge and use it in my WebDU presentation this year, scary stuff!)

Cairngorm still a great framework, and like you said, many experienced
developers have worked with it, so why on earth would you reinvent the
wheel and make your own "version".

Cheers

Phil Douglas
> Consulting . Recruitment . Software Licensing . Traininghttp://www.rocketboots.com.au

ric...@gmail.com

unread,
Feb 20, 2008, 12:54:45 AM2/20/08
to Flash Aussie
Sorry to double post.

I recommend reading this:

Framework Shootout at the SilvaFUG Corral
http://puremvc.org/content/view/43/98/

Its an article on camparing the features of various frameworks. It's
posted on the PureMVC blog so i think you can guess the outcome :P

Cheers

Phil Douglas

On Feb 20, 4:11 pm, Robin Hilliard <ro...@rocketboots.com.au> wrote:
> Consulting . Recruitment . Software Licensing . Traininghttp://www.rocketboots.com.au

Robin Hilliard

unread,
Feb 20, 2008, 6:49:04 PM2/20/08
to flash...@googlegroups.com
Hi Phil,

Interesting presso, I'm going to take a look at PureMVC, although as you suggest they do seem to jump to their conclusion :-).  On the face of it the things that I picked up on were:


1. They say singletons are bad (I agree - Singleton is a polite way of saying global variable. Rod Johnson has a good explanation of this in Chapter 4 of his J2EE Design and Development book) and that Cairngorm has them, but then PureMVC seems to have them as well.

2. They said that PureMVC was good because references to singletons were held in instance variables, but this is usually what happens by convention in Cairngorm projects anyway e.g. a model instance variable in a view, set once in the creationComplete processing.

3. PureMVC's mediators seem very much like Cairngorm's view helpers - we actually used these, with the addition of interfaces to hide concrete view classes from commands, in the Australian Financial Review application, see http://tech.groups.yahoo.com/group/cairngorm-devel/message/152 for details.  We didn't have to break Cairngorm to do it.  View Helpers are deprecated (despite my support) in Cairngorm, binding/changeWatcher being a far better supported and more powerful option most of the time, but they are particularly useful for Flash development when there is no binding available.

I have to have a better look at PureMVC if only to allay my ungenerous suspicion that it's just American resentment of having to use a framework named after a Scottish mountain (and use the proper English spelling for initialise())...

Cheers,
Robin
                                                        

Robin Hilliard

CEO - RocketBoots Pty Limited
Consulting . Recruitment . Software Licensing . Training

switch    +61 (0)2 9323 2500
fax       +61 (0)2 9323 2501
direct    +61 (0)2 9323 2507
mobile    +61 (0)418 414 341

Bjorn Schultheiss

unread,
Feb 20, 2008, 8:53:55 PM2/20/08
to flash...@googlegroups.com
If anyone was interested in that GAIA frameworks here's some more info.
http://aralbalkan.com/1219
Reply all
Reply to author
Forward
0 new messages