There are all sorts of ways to do this. If you are designing an application, and that application is more than a very simple one, you probably should follow some sort of architectural pattern, for example Cairngorm, Pure MVC, Swiz etc.
cairngorm is the worst Framework , better start using mate
What I think you should look at is Mate, which uses Flex to it's full potential, and it isn't built around global variables. Instead it helps you write loosely coupled, testable, reusable and maintainable code .
Save India From Corruption - Anna Hazare.
Joined: Aug 07, 2008
Hi Ravi, Do you have any sample code for navigation, I tried SWIZ but didn't get for navigation.
If you having code in mate, can youu please send me at "firstname.lastname@example.org".
Well going one JSP to another JSP page... or one PHP page to another PHP page - is the common HTML web application mindset which is premised on "pages". Server side pages more specifically...
To go one from one MXML "page" to another MXML doesn't quite translate in that context. A key thing to note is that Flex applications are pure client side. At a basic level Flex application, is one "binary" if you will (a Flash swf file)... so you could go from one Flex application, to another Flex application - not advised however.
So within your Flex application you'll have various visual components that you can control what show's and when either programmatically, or using something called states. In the book we have one chapter on application navigation, and another chapter on using view states. Flex comes with something called navigator containers (e.g there's a tab navigator that let's you put a bunch of tabs up at the top and the content changes depending on which tab you click on).
Oh and on the topic of MVC frameworks - they most certainly can help you with the separation of concerns.
in the book we have a big chapter on architecture and cover in depth the RobotLegs MVC framework, http://www.robotlegs.org/ (one of the authors, Joel Hooks, is a member of the RobotLegs team). Another option is the Swiz framework (http://swizframework.org/). Both are made to be lightweight and simple.
To go one from one MXML "page" to another MXML doesn't quite translate in that context.
I am sorry for the Late Response , but if your problem is that , navigating from one MXML to another MXML , then why dont you use SWFLoader . As every MXML component would be converted into an swf file , depending upon the Action of the user , use SWFLoader load method of it .
Your google search should be "SWFLoader from Actionscript + Flex 3" ?