Results 1 to 6 of 6

Thread: what s the best way to store in the session tabular data received from web service

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Posts
    589

    what s the best way to store in the session tabular data received from web service

    I invoke a web service, that returns tabular data, example: the list of contracts. Each contract is a representation of a row. So it s like a table of let s say 1000 rows, but in xml format.

    If my intention is to display those data in a gridview, but I want to store the date for other means, like if the user goes back to the page, I don t want to invoke the web service again. Plus, i need to implement search capabilities, where the user can search for specific contract, or a set of contracts amongst those returned whole list of contracts from the web service.

    All This is just to say that i need to store the received data in memory for further search capabilities. Keep in mind, pls, that I will never update the data, only read mode.

    What s the best way to store the receved tabular data from the web service in memeory?

    Should I use objectdatasource, xmldatasource, dataset, typed dataset, leave the data in xml file,...etc? what s good option for my purpose?



    Thanks a lot.
    Thanks a lot for your help.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: what s the best way to store in the session tabular data received from web service

    I assume then that this same data will be available to all users who want to view it. Is that correct? Store it in a cache object. What data 'source' you actually use is quite irrelevant because when you compare the time it takes to invoke the web service and receive the data with the time it takes to convert the data from one format to another, the conversion process is pretty negligible.

    I'd suggest you call the web service, convert it to the data type you want and then put it in the cache. In each call to that method, check the cache first before you call the service.

    Conver it to the type that you need the data to be in. If your controls want a dataset, make it a dataset. Or make it a List<>.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: what s the best way to store in the session tabular data received from web service


  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Posts
    589

    Re: what s the best way to store in the session tabular data received from web service

    Quote Originally Posted by mendhak

    Conver it to the type that you need the data to be in. If your controls want a dataset, make it a dataset. Or make it a List<>.
    This is the part that targets really me question. I am not concerned about caching, versus not caching..etc. In addition, the users don t really share the data. each set of data returned by the web service is only for the user's session.

    Any way, regarding the quote above, I was just wondering if there were other alternatives. so far, I mostly can use either dataset or Ilist, is there any other alternative for storing the tabular data returned by web service in local store? so far u suggest dataset and Ilist, any other options?

    Thanks a lot, Mend, the helpful guy
    Thanks a lot for your help.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: what s the best way to store in the session tabular data received from web service

    XML, Dataset, List, ArrayList, HashTable.

    You can use anything that's serializable. So really, there isn't a best format to store it in; you choose whatever you want your controls to be working with. If, for example, it's a gridview, then I'd cache the dataset or the List. If it's not a gridview but some custom code that has the capability of reading the XML, I would let it remain XML.

    In any case, the most efficient way would be to store it in the data format closest to the final result that you want to retrieve.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2006
    Posts
    589

    Re: what s the best way to store in the session tabular data received from web service

    Quote Originally Posted by mendhak
    XML, Dataset, List, ArrayList, HashTable.

    If it's not a gridview but some custom code that has the capability of reading the XML, I would let it remain XML.
    Do you mean in an XML file on the disk, is that right? or is there another way to have XML data without having it in a file in the disk? may be u mean in some xml string or somethign like that.

    The reason I am so paranoid about xml and web services is that my experience with this stuff is semi negligeable.

    culture="fr-CA" : Merci beaucoup
    Thanks a lot for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width