Home > Mobile >  Similar functions to WeChat friends circle how to save the data?
Similar functions to WeChat friends circle how to save the data?

Time:11-03

Now to do a similar WeChat friends space function, but get the json data from server is more complex, and more, is to use sqlite save or json files stored in the local? Use sqlite, table structure is more complex, also don't know sqlite withstand the large amount of data,

CodePudding user response:

Persistence is necessary, first to see if you do feel do friends as long as this function to upload with a temporary to prevent failure can retransmission, avatar, friends tag should do persist, friends feel it is not necessary to the json data storage. The key is how elegant expression of reply the data of one layer

CodePudding user response:

Should be stored in the local, saved data should also be a certain amount of, just used to cache some data, redundant data are request to the server, is circle of friends, of course, if is chat logs, all can only be saved to the local, I've been refresh function, circle of friends found just cache some data

CodePudding user response:

I know is to keep to the local, I now of what is to preserve, sqlite database and XML, json files saved to the local?

CodePudding user response:

What the local database update, refresh every time to request database meaning not lose half?

CodePudding user response:

Database better, just three fields, id, name, json
Directly to the json save the entire line, which has such a trouble a save

CodePudding user response:

WeChat should be in the database, friends should be cache only the first page, not all cache,
  • Related