Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

XML vs CSV for Flex apps

Avatar

Level 1

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 -

2 Replies

Avatar

Former Community Member

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.

Avatar

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-