Domanda

I am designing a restaurant based app which has lots of images.

Please tell me:

  1. How should I save images in the database i.e. in which format so that time of retrieval and display in the app is minimum? (Note: This database is a MySQL and located on an external server).

  2. How should I retrieve them, i.e. which method to go for (JSON, etc)?

È stato utile?

Soluzione

Dont use remote database server connection from application directly it may lead to slow performance . Instead use webservices as a intermediator between the database and your application. Your app should call a webservice which will internally query your database and return you the response . First response can be XML or JSON , but i would personally recommend you for the JSON as very fast from XML . Your first webservice response will return only the urls for images that you should download asynchronously so that UI thread is not hanged up .

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top