I have a question for naming. fetchXXX VS getXXX VS retrieveXXX, when you get from API or Local DB. what do you use or when do you use them? any differences?
p
Pablichjenkov
06/02/2023, 6:32 AM
getX
when there is direct access to the resource in the same thread, and getX returns immediately.
retrieve/fetch/resolve
when the function returns a result but the result is not returned immediately in the thread. Either because of suspend, or asynch coroutine.
request
when the function doesn't return a result, and uses some callback mechanism to do so later on.