Re: [android-developers] Re: Which pattern is most common for apps that involve communication with servers?

2015-02-20 Thread Kristopher Micinski
The main hypothesis I'm wondering about is how developers pass data from their app to the network. Since any use of the network necessarily involves threads, there are a variety of ways this could occur. Most of the ways with which I'm familiar utilize methods where the communication between the

Re: [android-developers] Re: Which pattern is most common for apps that involve communication with servers?

2015-02-20 Thread Kostya Vasilyev
For me, all network activity is performed by tasks which are executed by executors on a pool of threads. Not Java executors, but something a bit more flexible for my needs -- priorities, cancellation, per-thread affinity based on each task's account, etc. The data is written to a database,

Re: [android-developers] Re: Which pattern is most common for apps that involve communication with servers?

2015-02-20 Thread Kristopher Micinski
Right, the way I understand it is that this (task based model) is the pervasive for Android development. I would suspect that the only people not using this model are those that are incorrectly using raw threads because they haven't picked up on the right Android facilities. (I'm sure there are

[android-developers] Re: Which pattern is most common for apps that involve communication with servers?

2015-02-20 Thread erdo
Sorry for the huge post, but for what it's worth, every app that I do nowadays has the same general pattern... I basically have a model class(es) that incorporates any logic or data that you don't want cluttering up your views/activities/fragments and where you would do any networking stuff.