Sunday, 15 April 2012

client server - Have data fixed or fetch for it Android -



client server - Have data fixed or fetch for it Android -

i interested approach take in situation if have client/server application in have categories (just type name - coffee shop, restaurant, etc. , icon it), may want expand in future.

one way it, see know, have string list resource (xml) , appropriate icons on client side (concretely android client), , when want add together new categories, have build new version , deploy (if i'm not wrong , gets binary when compiled).

the other way have type list on server (let's simple entity type , icon), , you're client fetches whenever needed, per example, first fetch category names, , appropriate icon selected.

so i'm interested in improve in situation this?

this called syncing functionality. depends on requirement , situations.

there 3 ways implement such functionality:

put required things within app , deploy onto play store. put static things within app(client) , dynamic changed values on server. put on server , sync client , when required.

way 1:

in way, need set app. advantages of doing not have depend on server , loads faster. disadvantage of doing have deploy app , when info changes, if alter in single value.

way 2: in way, can maintain static things company logo, company banners , such values don't alter frequently. , can store rest of values think changes employee list/details.

so if there new info available, client needs notified can sync latest info local database.

advantage of way 2 wouldn't have load static things again.

way 3: in way, supposed on server, client has sync info on first launch , whenever new info available.

advantage of way 3 don't need deploy app if alter in info values. depend highly on network connectivity/server, developer has implement corner cases avoid sync/data loss.

android client-server

No comments:

Post a Comment