Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: difference between flex and flash  (Read 10731 times)
landed
Full Member
***
Posts: 37


View Profile Email
« on: October 06, 2009, 03:54:05 »

I noticed that in flex the view components are created from the main application mxml you can then have components registered to mediators.

In flash the stage component items or views are instantiated from the stage mediator, I'm wondering what this means for me trying to get to grips with flex as a flash guy. If there any specific difficulties conceptually I might face.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: October 07, 2009, 06:08:08 »

In both Flex and Flash, some amount of the view hierarchy is already created and other parts may have their creation deferred.

In Flex, this we use the declarative MXML that defines the main application to create a view hierarchy to get started with. It could be a bare Application with a script block, and have some Mediators and Commands populate it from scratch by instantiating the components and building the hierarchy, but that'd be throwing the baby out with the bathwater. MXML makes it easy.

But Flash does as well. You can lay out your components on the Flash stage at design time, then when you startup PureMVC, then you can wrap Mediators around the necessary parts and be off to the races.

-=Cliff>

Logged
landed
Full Member
***
Posts: 37


View Profile Email
« Reply #2 on: October 08, 2009, 07:04:25 »

From what I now understand since getting to grips with the seeming best practises and example code it looks like the flash views are created on the satge by the stage mediator all are hidden and managed at this point. Of course by this time the pmvc framework is all up and running.

With flex I see the visual elements all created before we run the startup command as they are children of the Application tag (don't have to be) and we only start the pmvc framework on the application complete.
I am looking at just having the application tag then doing similar to the flash creation method doing the framework first idea, it just makes more sense to me.

BTW examples use creationComplete however in this thread this is why null was comming through
I now use applicationComplete="facade.startup(this); this is no longer null !


;D
Logged
Pages: [1]
Print