4 Replies Latest reply on Jun 7, 2010 7:50 AM by joa__

    Flex and 'larger' applications?

    Peter.Coppens Level 1

      Flex fans,


      We have been developing a webapp with a Flex frontend (Java backend) for the last three years and have experienced good customer feedback wrt usability and look and feel of the application.


      The application has been growing, the team has been growing, the "development velocity" has gradually come down. Partially that can be explained by the growing team, but more and more we experience unacceptable slowdowns because of the development environment.


      I see the following underlying reasons


      • Build/compilation speed is (still) extremely slow. We have tried maven, Flex builder and IntelliJ. Build time seems to "exponentially" grow with application size.
      • Tool support for integration testing is borderline. The amount of time we have struggled with the dreaded "security sandbox violations" is absurd, to the extent that most developers don't even bother to run the tests before checking in source code (the standard solution with "trusted directories" in combination with IDE builds gives unpredictable behavior)
      • A number of weird platform limitations nobody seems to bother "fixing". The most visible imo is lack for decent http support. After all Flex is all about web app's so http support seems basic.  Just look at http://livedocs.adobe.com/flex/3/langref/flash/net/URLRequestHeader.html. The hoops we have to go through to get a HTTP header to/from the server are extreme.  Similarly, file upload and proxy/server security is biting us hard. We need to drop Flex file upload because we can not seem to pass through some coorporate proxy's some of our customers are using. I know the browser/plugin is to blame, but in the end, that does not matter. We just need to get the thing working.


      Assuming we are not the only dev organization having issues with this, how is everyone else coping?


      Any tips or tricks to share?  Any guidance would certainly be welcomed. Voices to back away from Flex are getting louder even though that means loosing a tremendous amount of R&D investment).





        • 1. Re: Flex and 'larger' applications?

          Hey Peter,


          We are also developing a large app in Flex at the moment. Certain platform limitations are certainly a bottleneck. As far as compilation of app goes, I believe you are developing your app with modular approach. Using modules (even better if modules are treated as separate projects) reduces compilation time to a great extent.


          Here one thing to evaluation is the user experience and look and feel vs technical limitations vs other similar technologies. I believe your app has been performing well so far. Now you would need to decide if your future requirements have major contribution towards coping up with the limitations of the technology or not. Every technology has certain limitations and benefits. Cost/benefit and Feasibility study is important to decide your direction.

          • 2. Re: Flex and 'larger' applications?
            GordonSmith Level 4

            Regarding your build times, it would help us if you could answer the following questions:


            * How many projects do you have in your workspace?

            * In addition to an application, are you building libraries, modules, or both?

            * How many MXML files do you ahve? How many AS files?

            * How long does a full build take?

            * How long does a typical incremental build tag?

            * Have you increased the amount of memory that Flash Builder can use?


            Gordon Smith

            Adobe Flex SDK Team

            • 3. Re: Flex and 'larger' applications?
              Peter.Coppens Level 1



              Thanks taking time for this.


              >>* How many projects do you have in your workspace?



              >>* In addition to an application, are you building libraries, modules, or both?

              We are building three applications (swf's), no modules.


              >>* How many MXML files do you ahve? How many AS files?

              $ find . -name *.mxml | wc -l


              $ find . -name *.as | wc -l



              >>* How long does a full build take?

              About 10 minutes from the command line using maven with flex mojo's.


              >>* How long does a typical incremental build tag?

              I wish I could give a number for that. It depends and is really unpredictable, but it is not uncommon it takes longer than 10 minutes. If you change something in the top level project (the one that generates the swf), it is not all that bad typically (2 minutes as a guess), but if you change something in a deeper library project all bets are off.


              >>* Have you increased the amount of memory that Flash Builder can use?

              We have not used Flash builder. We left Flex builder about 6 months ago and switched to IntelliJ which, at that time was given us better results. It also supports parallel compilation which improved build times for us. Perhaps Flash builder would give us equivalent results. We certainly tweaked the memory settings. Problem at the time was that fcsh never seems to have enough of it and always wants more to the extent that every few hours restarting flex builder (at that time) was necessary.


              Again thanks for you time, it is appreciated





              • 4. Re: Flex and 'larger' applications?



                we are working on a project with ~140 individual modules, ~4000 AS3 classes and ~1300 embedded PNG files. Development is only possible with IntelliJ IDEA for us. We tried several Eclipse solutions.


                Building the project was done with a custom application that spawned compilers in parallel (in fact thats the reason why IDEA supports it now:)) but we are now migrating to FlexMojos 4.0.


                Currently a complete rebuild of the whole projet takes about 1min 40sec on a quadcore without unit tests. This is already faster than the time we were achieving with the quick-and-dirty custom build app because FlexMojos handles the ActionScript compiler really well. Some upcoming features of FM will speedup incremental builds significantly as well.


                Another idea is to rethink your project/module layout as well. The Google Guice presentation is a good point to start. If you modularize your application a little bit better you do not have to recompile the whole project for changes at the core.


                One note: We are still using custom tools, some are integrated in FlexMojos now. For instance PNG compression to DefineBitsJPEG4 tags is possible with Apparat's Reducer and scales well with multiple cores.