Considering the time required for serialization/deserialization, using
something like webORB would improve parsing time, as it uses a binary
format which can be parsed more easily than a text format. But unless
you're using large datasets/doing lots of web service calls, the
advantages are probably negligible.

Are you transmitting everything in the array collection back to the
web service, or just the IDs of the selected rows? Transferring
everything including the row data would remove the need for another
database hit, but for large datasets, that could be quite a bit of
traffic. I'd say it would be better just to transmit the IDs back to
the webservice, and let the webservice hit the database for the row
data (some caching on the server-side would help too).

2009/6/8 Angelo Anolin <angelo_ano...@yahoo.com>:
>
>
>
> Hi Sam,
>
> Thanks for your reply.
>
> As of now, I actually prefer to utilize what I know on .NET and what I am
> learning on Flex. Adding another utility (Web Orb) in my learning process
> may complicate things a bit.  I might consult this later if I feel that the
> needs for is getting tremendous.
>
> Anyway, I am actually able to generate the report from what I am currently
> doing (no error encountered), where the ArrayCollection I am parsing into a
> delimited string, passing the string to the webservice call, and letting the
> webservice de-serialize the string to populate a Crystal report document
> which I subsequentlt display in another browser window which I call from the
> Flex application.
>
> I mentioned that I did not feel it is the "BEST" way because I am literally
> storing all datagrid (report) information in a string variable.  Assuming
> for example that the data displayed in the datagrid is quite huge, then
> creating the delimited string would take some time and additional processing
> time could also be consumbed by the back end web service to parse the string
> and populate the report.
>
> As of now, this is what the application does.
> 1. Flex App calls a webservice to retrieve data.
> 2. WebService responds by sending back a dataset which is returned as a
> string (via Dataset.GetXML method of .NET).
> 3. Flex App gets the service response, converts the string into an XML.
> 4. Flex App converts the XML data into an ArrayCollection which is bound to
> the datagrid.
> * Please note that I used array collection here for the search/filter
> functionality of the datagrid.
> 5. When generating print out of the data displayed in the datagrid, Flex
> would then serialize the ArrayCollection into a delimited string and send it
> to the web service.
> 6. Web Service would then de-serialize (or parse) the string, populate a
> .NET dataset which is the datasource for the Crystal report.
> 7. Crystal report is bound and PDF report is generated.
> 8. Flex displays via external javascript call the PDF report generated.
>
> Is there a better way for the ArrayCollection to be sent to the webservice,
> the webservice in turn would just convert it to dataset and the dataset is
> immediately bound to the Crystal report?
>
> Thanks.
>
> Regards,
>
> Angelo
> ________________________________
> From: Sam Lai <samuel....@gmail.com>
> To: flexcoders@yahoogroups.com
> Sent: Monday, 8 June, 2009 8:49:36
> Subject: Re: [flexcoders] Flex and .NET
>
> 2009/6/8 Angelo Anolin <angelo_anolin@ yahoo.com>:
>
>> I feel that this is probably not the "BEST" way of doing this.  I tried
>> initially to pass an XML delimmited string, but .NET seems to read XML
>> differently( ?) from Flex.
>
> I'd say XML would be a good way of doing it. What kind of errors are
> you getting, and how are you making the web service call?
>
> The other option is to use AMF, a native messaging format for
> Flash/Flex. This I believe would save you the effort of serializing
> and deserializing - it does it for you, among other things.
>
> http://www.themidni ghtcoders. com/products/ weborb-for- net/overview. html
>
>
>
> 

Reply via email to