Best Way To Download A 300 Question Quiz To My App?

Hello,

I need to write an app that downloads about 300 questions with multiple choice answers to each to use on my app. I also need to save them so it can be used offline. The questions with answers are stored on a ms sql database so I will have to call a .NET aspx page to return data to the mobile app. Is it best to save everything to a text file on the server first and then download the whole file? If so, what is the best way to save it? I will need to know what questions were answered wrong as I go through the quiz and remember where I left off at any time.

Thanks for your help!

Warren

I’d recommend having the server return JSON and then parsing it client side.

as far as client side storage, save you can call json.serialize/deserialize to translate lua data structures to/from text which makes for easy storage. 

I have a trivia game and it’s hosted in a MySQL database using PHP to fetch the questions and return them to the app.  I’m using JSON for the data transfer since it really helps map PHP arrays (which is what I get back from the database) to Lua Tables.   In my case, for offline play I actually include the questions in a large JSON table in the app bundle.  I only grab 20 questions at a time during play, but 300 questions shouldn’t take too long to transfer.

I’d recommend having the server return JSON and then parsing it client side.

as far as client side storage, save you can call json.serialize/deserialize to translate lua data structures to/from text which makes for easy storage. 

I have a trivia game and it’s hosted in a MySQL database using PHP to fetch the questions and return them to the app.  I’m using JSON for the data transfer since it really helps map PHP arrays (which is what I get back from the database) to Lua Tables.   In my case, for offline play I actually include the questions in a large JSON table in the app bundle.  I only grab 20 questions at a time during play, but 300 questions shouldn’t take too long to transfer.

Hi,

I’d like to extend the question a little if that’s ok and apologies if i’m hijacking the post. I want to do a similar thing but I’m not sure which is the best way to address my requirements. I will have many images that will have meta data attributes associated with them for example it might be a different image if the Locale is one area compared to another. It might also have a difficulty attribute associated with it too.

I have a VB/C#/DB based background and I’d simply create the necessary structure and relationships in a DB, however, would it be the most efficient way to either use a DB (SQL litev3), store the images in a file structure/folders on the device with a db or table or something else that points to the filename and relevant attributes, or as they’re images, use sprite sheets again with a DB for the meta data attributes?

Does anyone have any guidance on this? Again I’d like to keep it with an open mind depending on advice on speed and efficiency etc. as downloading newer/updated images over the web could be a way to add monetization to the app.

Thanks in advance.

Adam

Hi,

I’d like to extend the question a little if that’s ok and apologies if i’m hijacking the post. I want to do a similar thing but I’m not sure which is the best way to address my requirements. I will have many images that will have meta data attributes associated with them for example it might be a different image if the Locale is one area compared to another. It might also have a difficulty attribute associated with it too.

I have a VB/C#/DB based background and I’d simply create the necessary structure and relationships in a DB, however, would it be the most efficient way to either use a DB (SQL litev3), store the images in a file structure/folders on the device with a db or table or something else that points to the filename and relevant attributes, or as they’re images, use sprite sheets again with a DB for the meta data attributes?

Does anyone have any guidance on this? Again I’d like to keep it with an open mind depending on advice on speed and efficiency etc. as downloading newer/updated images over the web could be a way to add monetization to the app.

Thanks in advance.

Adam