15 Replies Latest reply on Nov 15, 2009 11:57 AM by flexbite

    With flex does one typically use a single page for complex apps?

    flexbite

      I'm used to building a 'page' for many application business objects; like there'd be a customers page, with a tabbed interface to details; an employees page, with it's own tab set; inventory page, etc. Does flex want you to work with a single page model?

       

      http://learn.adobe.com/wiki/display/Flex/3e.+Multi-page+applications

       

      seems to indicate that a one page model is typical. I don't particularly find that enthralling; our apps get very complicated and it's hard to imagine trying to shoehorn what might have been a hundred pages worth of functionality into a single page without it getting unwieldy.

        • 1. Re: With flex does one typically use a single page for complex apps?
          Subeesh Arakkan Level 4

          Hi,

           

          You can use Modules to split your application into several pages. The main application dynamically load other modules when needed.

           

          Check this livedocs page for more information

          http://livedocs.adobe.com/flex/3/html/help.html?content=modular_3.html

          • 2. Re: With flex does one typically use a single page for complex apps?
            Gregory Lafrance Level 6

            As you might imagine, in the end it is the purpose of the app and how it can best serve the end user that should drive your design.

             

            Having made that blanket statement, in Flex apps you have one point of entry, a URL to a SWF, but after that there are many options.

             

            You can use ViewStack for a seamless multi-page design, and for large numbers of pages, most of which the typical user will never see, you can use modules loaded at run-time as necessary.

             

            You can use the other navigator containers, such as TabNavigator and Accordion, and you can use other containers like VDividedBox and HDividedBox for even more useful design.

             

            In the end, just be familiar with the various Flex containers, and also architectural features like modules, RSLs, and SWFLoader, and examine other great Flex apps and go from there.

             

            If this post answers your question or helps, please mark it as such.

            • 3. Re: With flex does one typically use a single page for complex apps?
              JeffryHouser Level 4

              The concept of "pages" works really great for a web site; since it is just a collection of documents.  The bulk of web applications are, basically, a way to create and maintain the pages of a web site (AKA A Content Management System )

               

              However, Flex is for building applications.  The concept of pages does not apply very well to applications.

               

              How many pages does Firefox have?  How many pages does Microsoft Word have?

               

              To create a tabbed interface, you might look into a TabNavigator; and others have expanded on other approaches.

              • 4. Re: With flex does one typically use a single page for complex apps?
                flexbite Level 1

                Modules sound like they are about as close to the way I am used to building applications. I will check out the various containers as I learn flex.

                 

                I am curious, are there a non-trivial data centered flex apps that one can download and learned from? I've seen a lot of demo apps and many are nice but not so deep. The apps we build are pretty complex, which is why this question came up in the first place.

                • 5. Re: With flex does one typically use a single page for complex apps?
                  flexbite Level 1

                  Sorry Jeffry you lost me with the Firefox and Word analogies. Firefox is a container for documents, and so is word. I can't see how they relate to application building.

                   

                  What we deal with day to day are not so much content driven apps like CMSs. Most of the data driven applications we build have between 50-200 pages/forms. Each page is complex; a typical page has 20-100 objects that a user can interact with like fields, buttons, grids etc. A user might use 10 of those pages in a session, or 3, or 20. Pouring all of that into one flex page with viewstacks...I just cannot imagine that being easy to work with. Thus the question, how do you guys normally handle this kind of situation. Modules seem to be one route.

                  • 6. Re: With flex does one typically use a single page for complex apps?
                    pauland Level 4

                    flexbite wrote:

                     

                    Sorry Jeffry you lost me with the Firefox and Word analogies. Firefox is a container for documents, and so is word. I can't see how they relate to application building.

                     

                    In Firefox, navigation is from page to page. In word there is once display with all of the controls embedded in it. This is a fundemental difference and central to the architecture of the respective applications.

                     

                     

                     

                     

                    What we deal with day to day are not so much content driven apps like CMSs. Most of the data driven applications we build have between 50-200 pages/forms. Each page is complex; a typical page has 20-100 objects that a user can interact with like fields, buttons, grids etc. A user might use 10 of those pages in a session, or 3, or 20. Pouring all of that into one flex page with viewstacks...I just cannot imagine that being easy to work with. Thus the question, how do you guys normally handle this kind of situation.

                    I think the secret is to not try and translate a page based application directly into Flex as though Flex was a html browser. The most impressive applications reduce complication and replace form based controls with more subtle controls that allow interactivity and visual feedback. Typically ria apps can provide alternate views and "pages" through the use of view states, tabbed interfaces, accordian panels and all kinds of bespoke panels.

                     

                    My suggestion is that generally you should look at what you need to do and how you can do it differrently if freed from a page paradigm and with controls and interactivity that aren't available with html.

                     

                    I can't actually imagine an application that would require 200 pages. What is it?

                     

                    Paul

                    • 7. Re: With flex does one typically use a single page for complex apps?
                      JeffryHouser Level 4

                      Firefox and Word are applications; they do not relate to application building at all.  I was trying, perhaps unsuccesfully, to differentiate between "pages / web sites" and "Applications".  My intended point was that the concept of "pages" does not apply very well to applications.

                       

                       

                      I like the analogy of Word and Firefox as document containers.  I'd say most, but not all, of the applications I use are exactly that.  But using that description, you're asking how to create pages with Flex.  I'd say don't.  Create the page container with Flex. 

                       

                      I think of modules as self contained applications; that can easily be pieced together for a portal style interface.  It does not sound like that is what you're doing.

                       

                      I can accept that you don't want huge forms with hundreds of objects in a single MXML or AS file, though.  Perhaps you should look into creating custom components to represent each grouping of your Viewstack and/or TabNavigator.

                      http://livedocs.adobe.com/flex/3/html/Part2_mxml_components_1.html

                      http://livedocs.adobe.com/flex/3/html/Part3_as_components_1.html

                      1 person found this helpful
                      • 8. Re: With flex does one typically use a single page for complex apps?
                        oldMster Level 3

                        First, Flex is not HTML, so trying to picture your app as a bunch of pages is not going to work.  If that is the only environment you've worked with, then you will need to learn/adjust to the new environment.

                         

                        If your concern is that all of your application has to be in a single 'page', ie, all the code in a single file, that is not correct.  You can/should split the application up into components, where a component could be roughly analogous to an HTML page.  Then you can organize those components into a container or set of containers to allow the user to navigate through them appropriately.

                         

                        We've developed a very large, complex application in Flex, which has a lot of components (hundreds, actually), with several developers working on it simulaneously, something we could never do if it was a single file.

                         

                        The one thing that you will need to adjust to, and then will find it extremely difficult to go back to, is that Flex/Flash, unlike HTML, is 'stateful', not 'stateless'.  You can create data in one component, that can be used and referenced in other components.  When the user changes the 'page', the entire DOM is not reloaded. This can be done in HTML with AJAX techniques, but it is the way Flex/Flash works normally.

                         

                        Mark

                        • 9. Re: With flex does one typically use a single page for complex apps?
                          flexbite Level 1

                          I was not trying to say that word and firefox are the same. I was saying that they are not models for applications that I build. Jeffry forwarded that idea, not I. A asp.net is an example of a technology that is used for building applications and it runs in a browser, yes, but I don't build the app with firefox or IE or chrome.

                           

                          We do a lot of medical software. They can get really complex, believe me. Most of the sample apps you see around (not just flex!) are simple; usually that makes sense too. But I was wondering if there were any complex db oriented apps available to download and explore.

                          • 10. Re: With flex does one typically use a single page for complex apps?
                            flexbite Level 1

                            oldMster, yes, you're speaking to my concern. I knew there must be ways to deal gracefully with apps that have lots of interface elements. A single page hosting most of the goodies just sounded...difficult. I figured there would be way around. Components, modules, I'll check them both out.

                             

                            Just in case you know of any, can you think of any demo apps or open source apps that use containers like your app does? Maybe containers are routinely used and I'll easily find examples.

                             

                            Stateful sounds great, actually. Flex is an appealing package, has been for while now, and Flex 4 looks to be even better.

                            • 11. Re: With flex does one typically use a single page for complex apps?
                              oldMster Level 3

                              Flexbite,

                              We also do medical software, so I am fully aware of the complexity. I was not a fan of browser based clients for medical applications until I found Flex.  We rejected VB early on as too difficult to maintain in the field - medical software changes too quickly for that model to be cost effective.  Browsers showed promise, but the stateless nature of the client and the server, plus the extraordinarily annoying and senseless differences between the browser implementations were difficult to deal with, and added cost without adding value for the user.  Flex gives us a stateful client, yet we can still update the SWF file on the server, and get an immediate, labor free update then next time the client hits the site.  Flex also eliminates almost all the browser inconsistencies.  We think Flex is just about perfect for our needs, but YMMV.

                               

                              Mark

                              • 12. Re: With flex does one typically use a single page for complex apps?
                                flexbite Level 1

                                Thanks Jeffry; I'll check out those links. I can see that you get why I was spooked at the idea of a single object for everything...I'll have to expand my horizons a bit and see how flex handles these issues.

                                 

                                Thanks

                                • 13. Re: With flex does one typically use a single page for complex apps?
                                  pauland Level 4

                                  flexbite wrote:

                                   

                                  I was not trying to say that word and firefox are the same. I was saying that they are not models for applications that I build. Jeffry forwarded that idea, not I.

                                   

                                  I don't think Jeffry made any such suggestion - he merely gave an example of an application that supports a page based paradigm and one that did not.

                                   

                                  We do a lot of medical software. They can get really complex, believe me. Most of the sample apps you see around (not just flex!) are simple; usually that makes sense too. But I was wondering if there were any complex db oriented apps available to download and explore.

                                  Good luck to you. Generally I see complexity as a failure to simplify, though I understand all the reasons that may get in the way. Maybe I'd think differently if I were involved in your field.

                                  • 14. Re: With flex does one typically use a single page for complex apps?
                                    flexbite Level 1

                                    Mark that's very encouraging - more or less the process are going through, are up against. We don't mind learning new ways of approaching things, at all, but I just wanted to get handle on how flex deals with lots of interface 'views'.

                                    • 15. Re: With flex does one typically use a single page for complex apps?
                                      flexbite Level 1

                                      Hi pauland

                                       

                                      I'm all for simplification and one of the daily battles we fight is to keep the complexity away from the end users as much as possible. But we are very focused on having a robust database as the skeleton of the app. Keeping the database design clean and flexible can mean propagation of complexity for the users; but we really do want to keep it as streamlined as possible. Thankfully, our end users are very familiar with the business rules involved, and once we start to get into their shoes, we're usually able to find a sweet spot, where what we ask them to deal with at the interface level approximates the mental model they carry around.