A
A
Anton2019-11-30 02:39:26
Android
Anton, 2019-11-30 02:39:26

What architecture should a simple app have to display data received from json?

Hello!
Some time ago I made a simple Android application to request json data from the server, displaying a list on the first screen.
Clicking on an element will display detailed information on that element.
You can see here .
Now I really want to continue studying android and implement it "correctly". Make the right architecture (MVP? MVI?, MVVM? LifeData), use optimal libraries (Dagger? for dependency injection, RxJava? instead of AsyncTask, some kind of caching is possible so as not to request each time if the data has not changed (where, by the way, store it, in weakreference memory or in the database?) Perhaps, instead of two "activities", two "fragments" should be used or one? On clean architecture with different layers, I read articles in both Russian and English, but the understanding is only very general.
Maybe can anyone give advice on how to make the correct architecture of such an application?Perhaps someone has done this?
I would be very happy to get advice on what problems my app has and how best to solve them,
I would also be happy to link to a material / book where it all comes together, especially about architecture.
I imagine (most likely approximately) why and how each of the android components is needed and even used them for different tasks in my applications (hi to stack overflow driven development), but it’s not very clear which solution will be optimal, which will be sustainable , easily changeable. To do this, I want to refactor my applications, starting with the simplest.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Romashkan, 2019-11-30
@EvgeniiR

In fact, the functionality there is a Gateway to the apishka and some kind of Presenter. This can be expressed explicitly. Among a bunch of hooks ( protected onSomethingHappened()) and static calls to Utils, it's hard to follow the flow of execution. (Utils cut out).
Well, on the little things:
- Cut out a bunch of commented lines
- Bring namings to a single style, preferably without any prefixes
- Do not process the same conditions several times within the private methods of the same class.

B
Bogdan Stolyarov, 2019-12-05
@bstolyarov

For architecture, I would advise you to look here https://telegra.ph/Android-Architecture-06-02
then architecture, and if you just want to "try" how to implement each of them, then it's better to do it on 2 architectures (in different branches for example) and "feel the difference", as they say :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question