What is the best way to work with user data coming from the server?

Asked

Viewed 49 times

1

I’m on a project for an online sales (mobile) app.

What is the best way to work with data from tables? Sqlite, JSON, creating a class, Localstorage?

For example, when soon, I don’t want to be on the server all the time looking for user information.

Taking into account that I don’t want to use JAVA in the application. I use the Intelxdk platform and develop cross-platform applications. " Locally" they are based upon HTML5, Javascript, Ajax, CSS. On the server side, I use PHP to handle data and communicate with Mysql.

I want minimize communication between PHP and Javascript.

  • Blz utluiz, it’s just an app for mobile, not a website... Only, to handle data like create a shopping cart, add Multiplus products, load lists with ajax, would like to have in the local memory (Client-Side), perform all manipulations, and then insert in the server... Even when logging in, bring all user data and work with them locally... Type gmail! Now I don’t understand the performance: "I would say that seeking user information is your least concern"

  • In this part of performance, I think that since, the majority of the population often depends on a 3g/4g, the less access to the server the better, and also thinking about the amount of simultaneous access with practically static information... Maybe this isn’t a problem then? As for the e-commerce part, I see it more as a good project design!

1 answer

1

Localstorage is the way to go. Only Operamini does not accept it yet, if you need to support it you will have to make special code for it, as far as I know there is no good solution. You will probably have to use JSON on cookies, what is limiting and a bad idea.

Anyway do not abuse Localstorage, it was not made to be a complete database. Get ready for the data you hope is not there and have to go to the server.

The cost of retrieving data from the server is usually small, if not in your case you may be abusing it. There are advantages to taking data from the server, the main one is security.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.