F
F
Fortunato282018-07-14 10:08:19
linux
Fortunato28, 2018-07-14 10:08:19

Correct data transfer from a mobile device?

Input data: there is a server (Linux) and a client part (Android, Windows, Linux), they need to exchange data (system settings, control commands, etc.).
Question: How is this usually done in normal projects/applications?
My assumption: the client collects/generates the necessary information, packs it into JSON, puts it somewhere nearby on the device's FS, sends the file to the server. The server does the same, the client accepts, puts it side by side, parses. Is it normal? How applicable to different client device OS? Perhaps there is some unequivocally safer / more convenient / generally accepted solution, and my assumption is an amateur's crutch? After all, at least on the client device, it can interfere with the JSON file and play a dirty trick.
I'm waiting for your answers, thanks.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Decadal, 2018-07-14
@Fortunato28

for client-server interaction, they usually use such a thing as an API ( a link that will not say anything).
Your option with sending a json file is a special (and strange) case of the implementation of this very API. At the moment, some kind of RESTful API is being practiced (no one knows how it should ideally look, but you will find a lot of information that will tell you what to do), the general idea of ​​\u200b\u200bwhich is to exchange data using the same types of requests that the browser uses ( HTTP request). In addition to it, there is a SOAP protocol. Choose what is more convenient and familiar, and use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question