AleFachini
Lurker
Hello this is a simple design question for better practices:
Example and Context: I'm creating an app that shows a list of items in a players stash. For this i need following requests:
The question is: In which order should i do this???
Option A: get items IDs > Save to DB > Read DB > get ITEM OBJECTS > Save to DB > Read Database > GET ICON IMAGES > FILL UI LIST
Option B: get ONE item ID > get ONE item Object > get ONE item icon > present to UI > save Item Object to Database
ON both cases i will have timeout or try cach for items that fail to get. ON both cases in the future I will only request ICONs for existant items or full requests for new items in stash.
If you have another suggestion or approach feel free to add it.
Example and Context: I'm creating an app that shows a list of items in a players stash. For this i need following requests:
- Ask for all items IDS, one request.
- Look for each ID and inside each response i'll get the ICON link. As many requests as ITEMS here
- Request each ICON. As many request at items here.
The question is: In which order should i do this???
Option A: get items IDs > Save to DB > Read DB > get ITEM OBJECTS > Save to DB > Read Database > GET ICON IMAGES > FILL UI LIST
Option B: get ONE item ID > get ONE item Object > get ONE item icon > present to UI > save Item Object to Database
ON both cases i will have timeout or try cach for items that fail to get. ON both cases in the future I will only request ICONs for existant items or full requests for new items in stash.
If you have another suggestion or approach feel free to add it.