javascript - Server overload ... with requests? How do I efficiently program server-client wise -


so, have server mysql database in it, , client (browser) retrieves data server , displays user.

i'm struggling on whether should let client data needs mysql server (using php), , let client querying, adding, updating data javascript or other related library, , send server server update data; or

whether should let client send requests (query, add, update, etc) server relevant parameters server handle user's data with, say, mysql commands.

i think first way relief server because work done clients' computer, , not server, hard me learn or make library querying , stuff can otherwise done mysql commands find easier work @ moment.

and think second way easier me, because can use php , mysql perform whatever server needs client, makes me think load server many repetitive work each client if there many clients.

which method better?

at moment, i'm client , server run on same computer, there won't load of commands server need run, want know method canonical , efficient security, efficiency, etc wise.

both solutions have pros , cons. if have huge set of data, don't want dump client, if need view or modify fraction of it. if of data needs protected against unwanted change (like user increasing access level, credit, etc) can't place logic on client since easy hack. if neither concern, client-side logic may indeed take lot of load off database server.

there client-side frameworks angular , react make working data easier, although have learning curve. check if fit needs.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -