I read many articles about how important it is to use these patterns, but I often see applications that are written, for example, using RETROFIT + OKHTTP, without using these patterns. I can not understand when and in what cases it is worth paying attention to these patterns.
1 answer
If you just need to occasionally ask the REST service, or send something to it, then you should use all sorts of RETROFITs and not complicate the whole thing.
And all these patterns should be used if you are writing a fairly complex client and data synchronization, a full local cache, and so on.
For example: Suppose Vkontakte we have RESTfull (in fact there is a hodgepodge of http requests).
Then if you are writing an application that just needs to check if a person is online, then just use Retrofit without any patterns.
And if you are writing a full-fledged client, where you need to store old data in a local database, you’ll be able to show which data is old and updated, whether a comment or “in line” is sent, then you should think about seven patterns.
By the way, the same Retrofit and OkHttp are also components in these patterns (block "Rest method").