I am using robospice and trying to lazyload a listview. I came up with couple of options and don't know which one is better or recommended.
Option 1:
Option 2:
I think first thing I need to be clear about is if requests that are added to spicemanager are executed and finished in the same order that they are added.
I assumed it is not the case and came up with above solutions
Thanks in advance :)
You right there is no guarantee on order of request processing in RS. Everything is massively multithreaded and it would artificially slow done things to guarantee an order.
I would definitely adopt option 1, not only in RS but in a sync operations at large. It looks much more robust. But if you are just trying to load data + images, did you have a look at RoboSpice UI spicelist module. It does exactly that, and we also offer a sample to see how it works.
Stephane