PDA

View Full Version : Flex 3 application structure


Kirzilla
09-20-2009, 02:22 PM
Hello everybody,

I'm pretty new to Flex, but I'm pretty long time in JavaScript and PHP. I'm really interested in Flex technology. Yesterday I've bought "Flex 3 Bible" book and started my learning.

As sample, I'd like to create application with 4 "pages"...


Adding photo and description.
Editing existing photos.
Viewing existing photos (with paginator).
Searching photos (search form with different options taking whole page, not single pagnel).


All this "pages" should have the same docked application toolbar...

So, I got a question. What kind of containers should I use for "simulating" pages. Should it be 4 different applications or just single application with 4 containers (what kind) ? What kind should I use if my application will contain more than 20-50 "pages"?

I've downloaded "Tour de Flex" to check what structure it have. I've noticed that navingation is placed to left side of application, but right side is like HTML frame, loading new .swf file each time I'm clicking on navigation options. Is is good application structure?

Probably you have any good link where I can read about creating big applications in Flex or some links about developing not simple Flex application.

I'm really sorry for my english, I'm from Russia. :rolleyes:

Good luck everybody! :)

Kirzilla
09-20-2009, 10:23 PM
Is using View Stack ok?

Is is ok, if I will use a lot of View Stack layers?
It seems to me that it is better to load every needed view stack during runtime?

Really need your answer...

neekoid
09-22-2009, 09:15 AM
That is almost exactly the question i have.

I have multiple 'screens' for very different purposes in my application and im at a bit of a loss of how is best to structure the app.

Multiple mxml files, swapping canvas's on state change, or letting flex builder do its thing and add / remove children on each state change (seems SO messy to me!).

The first alpha i did seemed to be buggy when switching between canvasses / states... so im inclined to think i must have done something wrong.

Anyway, answer his question ^^^^ and ill get my answer too!

Yui
09-22-2009, 02:58 PM
you can have 4 components on top of each other and make them visible/invisible according to your needs.

Peter Cowling
09-22-2009, 09:42 PM
you can have 4 components on top of each other and make them visible/invisible according to your needs.

sorry, but I would not recommend this approach.

Peter Cowling
09-22-2009, 09:47 PM
Multiple mxml files, swapping canvas's on state change, or letting flex builder do its thing and add / remove children on each state change (seems SO messy to me!).


Adding and removing children can be cpu intensive, but the alternative is to leave them all in memory.


The first alpha i did seemed to be buggy when switching between canvasses / states... so im inclined to think i must have done something wrong.


buggy it might be. If you have a performance problem then you might want to open up a seperate thread and post your code.

Peter Cowling
09-22-2009, 09:54 PM
Is using View Stack ok?

Is is ok, if I will use a lot of View Stack layers?
It seems to me that it is better to load every needed view stack during runtime?

Really need your answer...

You can defer the instantiation of components.

Quite a few flex developers use viewstack - I saw one well known flex/actionscript developer asking adobe to add it to spark in flex 4 a while back. I would say use it for now, and get whatever job you need to do done.

Then, when you get time, take a look at the new approach to states in flex 4. Also, if you can, try doing a pure actionscript project, and see how things are done in that situation.