7 Replies Latest reply on Feb 24, 2009 12:56 PM by Gregory Lafrance

    Good or bad mood ?

    jylaxx Level 1
      I really think that Flex has a lot of qualities, but...
      Flash Player 10 is here, with lot of goodies, but...

      1- Despite the fact that Adobe controls Flash, Flex and PDF Reader, it is still impossible to display from a Flex (not AIR) application, a PDF document sent as ByteArray through a socket connection ! (don't want to use IFrame or SWF PDF as FlashPaper, which are workarounds, even with AIR it is not straightforward, we have to use the html component and write the binary in a local file)
      2- Flex/Flash applications use a LOT OF ressources, especially memory. A very simple application (doing nearly nothing...) reach very quickly the same memory footprint than OpenOffice !! In a world of desktop virtualization and thin client architecture it could be a handicap. I come from the old time, where hard disk had a huge capacity of 10 Mo, so using one virtual hard disk to display an empty box is quite annoying, for me !
      3- I am also wondering why this forum is not a Flex application. It could be a good demonstration for all scepticals readers...

      Announces about using Flash Player on smartphones in a near future let us hope that Adobe is aware that these devices have ressources limitations !

      May be we could start to dream that Adobe will also take care of simple but critical requests...

      As for real life (energy, natural ressources), software ressources wasting is never a good option. It request more work from each people but it is always better for the community. We can do same or even better with less !!


        • 1. Good or bad mood ?
          Karl_Sigiscar_1971 Level 3
          1- If you use Adobe Livecycle Data Services to generate PDF documents on the fly, the PDF remote object writes the document to a Java byte array in the user's session with a given UUID. The byte array is then sent back to Flex when it does a HTTP request to the PDF Resource Servlet with this same UUID. It opens the PDF document in Adobe Reader thanks to the MIME Type.

          It is also possible to send to Flex a byte array via a remote object and have Flex do the parsing of the byte array (deserialized to ActionScript) of the PDF document and display it using Flex components and vector graphics rendering. This requires that you know about the PDF document format.

          2- Memory management is something that is up to you. You have to use best practices for garbage collection. Mark references to objects no longer needed as null. Use removeEventListener when you no longer need to listen to a given event. The Profiler in Flex Builder Professional is also here to help.

          3- No comment
          • 2. Re: Good or bad mood ?
            Gregory Lafrance Level 6
            I mostly use Windows, and yesterday I once again had to open iTunes just to open the CD tray on my Mac. Unbelievable...
            • 3. Re: Good or bad mood ?
              jylaxx Level 1
              Karl thanks to take time to answer.
              1- I was more precise in my post. I wrote "through a socket connection" (Socket object). I know it is possible to get a PDF with a HTTP request but I don't use HTTP. For plenty of good reasons, I have my own "light" server with my own protocol. I use http only to serve Flash modules. And your option about rendering a PDF with Flex component, I guess it is a joke !
              2- You are wrong. Who told you that I don't use best practices ? When I load my application with 2 or 3 simple modules and that the memory usage is at 40 Mb, BEFORE I DO ANYTHING ELSE that loading the module without any data loading and very few user actions, I don't see what best practices could do. But there is may be a misunderstood from me. As you seams to be an expert could you explain me the difference between the memory usage in the profiler and the value of flash.system.System.totalMemory. In my application, after first module load I have 4.3 Mb in profiler and 23 Mb in System.totalMemory, after second module load I have 5,5 Mb (+1,2Mb) / 35 Mb (+12 Mb) and after my third module load I have 6,5 Mb (+1,1 Mb) / 43 Mb (+8 Mb). And the memory usage of the windows task manager is following the System.totalMemory rather than the profiler usage memory.

              • 4. Re: Good or bad mood ?
                Jed Schneider
                do you mean that you had to use AIR/Flex to remotely open another application in order for the Flex app to eject the cd drive?
                • 5. Re: Good or bad mood ?
                  Gregory Lafrance Level 6
                  No I just mean that there is no button on my Mac G5 to open the CD tray. I have to open iTunes just to open the computer's CD tray. Just another example of a big, successful, influential company doing something that defies the imagination.
                  • 6. Re: Good or bad mood ?
                    Jed Schneider Level 1
                    What about the eject button on your keyboard? Or the eject button in the finder window?
                    • 7. Re: Good or bad mood ?
                      Gregory Lafrance Level 6
                      Neither works, don't know why.