Hi folks,
I am new to Backendless and I am trying to create my first app, a questionaire type app. I have APIs in place for retrieving questions and for posting them back. The questionaire will contain less than 100 questions, and I have working API and frontend code to read that into pagedata now. But to minimize the impact of the end user, I want to chunk what is presented to tue user so that questions appear only e.g. 10 at a time.
What I had in mind was to do 1 of 2 things:
- Do a single writeback to the database using API when all questions are answered
- Do a writeback to the database using API for each chunk
Since 1 will minimize the data traffic quite a lot, I was thinking of moving in that direction first. If I go with 2 instead, I will have to track which questions are already answered, leading to more complexity (I guess).
So the first question is really: Which approach seems like the best one?
Also, when writing the frontend here in Backendless, I am struggling a bit to figure out how to split the data into chunks and writing them back. Any ideas how that can/should be done? My thoughts are:
- Show 10 first questions in a form, with response alternatives
- When these are answered, and Next button is clicked, show the next 10 questions
- When the last 10 are answered, and Finish button is clicked, write all questions from Pagedata back using API
Does this seem like a reasonable approach, or am I totally off the beaten path here?