This content has been marked as final. Show 3 replies
The answer to this for Flex is the same as it is for other scenarios, such as
when writing code in any object-oriented language: it depends on whether you
are trying to make reusable components or not, and it also depends on how big
your page is getting -- if it is getting unwieldy because of its length, then
you might want to split it up into separate components.
In your example, I would probably start by putting everything on a single
page. But as time went on, if the page just got too long, I might split it up
into separate components.
Developer, Flex Builder team
Wally Kolcz wrote:
> Ok, I am storta retarded. Is it better to build individual components and
> then assemble them per 'page' or to building individual 'pages'?
> Lets say I have a 'page' that has a 2 tabbed tab navigator for 'project
> information' and 'project managers', a panel with 'project information' and
> another 4 tabbed tab navigator for 4 images that all make up a proofing
> Is it better to create 3 separate components (2 tab navigators and a panel)
> and assemble them on a 'page' or to put all 3 items on one page?
Well, my site has many different 'pages' / sections to it. Is it better to
seperate each section into one 'page' and just 'move around' components or
to create different 'pages'.
For example in the members dashboard it has links to different sections
(manage projects, manage clients, my account). It lists all the projects
that have been viewed and commented on by the clients as 'open tickets'.
If you click to the 'manage projects' section it is a list of all the
projects that they are a part of. From there, they can client on a link
(project title) and be taken to the proejct details page that lists all the
project information, the image of the project, and links to update or remove
Should combine all the various links into components and just move them
around in one 'page' or create multiple mxml pages for each of those?
I am trying to understand object-oriented langauges verses my native Classic
ASP and Coldfusion. Pardon my dumb questions.
Ah, you will be well served if you stop thinking about "pages" entirely. That is the old HTML paradigm, and the Flex RIA approach is much, well "richer".
Instead, think like a traditional desktop designer/developer, and think of screens or views.
Use the navigation components, like ViewStack and Tabnavigator, or the new "states" in flex 2, to interact with the user and change the presented interface.
For instance, in a viewstack, you can code the different views directly within the <ViewStack> tags. But if those views get complex, or you might want to use the exact same view somewhere else, just copy the view code into its own mxml file, then using a single tag within the ViewStack, insert that as a component. Functionally they are the same.