Answer the question
In order to leave comments, you need to log in
How to properly organize code in Java?
Hello.
Tell me, how would it be more correct to organize the mobile application code?
1. Take data from the text field, make a request in a separate thread, get a response in JSON, fill the object with the received data. Next, work with the object.
2. Take data from the text field, pass it to the object, in the constructor of which there will be a "request in a separate thread", the data from the response to which the object will be replenished. Further, also continue to work with the object.
Answer the question
In order to leave comments, you need to log in
I'll write in pseudocode:
пусть значение = получить_значение_из_поля();
пусть результат = запросить(значение);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question