2 Replies Latest reply on Jun 17, 2009 10:27 AM by nobodyFromHawaii

    XML vs CSV for Flex apps

    nobodyFromHawaii

      I'm a newbie to Flex and already love it.  I want your opinion on XML vs CSV.  I know for portability XML is the way to go but for performance I would take CSV any day.  In developing in-house enterprise apps in Flex, would it be better to develop ALL http service to return CSV instead of XML?  This is only between in-house servers and will not be going to any 3rd party interface, so portability is not an issue.  I'm more concern about performance vs. portability, especially over https.  The data will be bound to an array anyway so wouldn't it be faster at the network layer if CSV file is utilize?  Are there any other network protocol designed specifically to optimize XML data transfer?

       

      I googled XML vs. CSV but can't really find anything useful.

       

      This is my first post here, ever, so go easy on me ...

       

      - nobody -

        • 1. Re: XML vs CSV for Flex apps
          Gregory Lafrance Level 6

          If you use XML you will be able to use e4x syntax for filtering, drilling into data, etc. If you use CSV you will need to parse the data.

           

          I think the performance gain will not be worth it. Flex works well with XML and offers advantages, so I would just go with XML. In the long run you will be better off.

           

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

          • 2. Re: XML vs CSV for Flex apps
            nobodyFromHawaii Level 1

            When the httpservices completes isn't the result bound to an arrayCollection (or array) so you could essesntially accomplish anything you want, sort search etc..

             

            Is the XML result directly bound to a datagrid or is it bound to arrayCollection first and then bind the arrayCollection to the data grid?

             

            From the network layer comparison, say you have 100 rows with 10 columns, the file size of XML vs CSV makes a big difference.  Do you think this warrants bringing the file as CSV instead of XML?  You also have to consider the server side doing the extra formating.  You will notice a big difference in an enterprise database if its doing extra work and file I/O.

             

            Being so used to ODBC-RAW data, I'm finding some apps are slow because of the XML format and I'm looking for an alternative similar to the ODBC-RAW data format.  I do agree that you can do more with XML but if it's just use for say in drop down list, data grid and not so much for formatting, I think CSV will do just fine.  I would however, bring in a single row as XML.

             

            Thanks for replying back so quickly.

             

            -nobody-