Suggestions to improve my current Solution

Suggestions to improve my current Solution

I'm currently doing an Application to create and answer a Survey, as well as analyzing the answers received. Each Survey is made of N Question Groups, and each Question Group has M Questions. Each Question can be of several types (Single Choice, Multiple Choice, Open Answer, Matrix, and so on).

Now, the way i implemented the screen to answer was having a web block to create the question, having each question type already created but hidden in if's, in order to only present the correct question type. Since each of the Survey's pages has, at max, 1 Question Group, i had to make a Question Table with all the questions per group, where each Row is the Question Web Block.

Now, to go to the next page, a "Continue" button must be pressed in the Answer page. Since the questions are in Web Blocks, the answers are also saved there. In order to fetch the answers that were given, they are saved in each web block to a session record list variable, and the fetched in the "Continue" Action and added to the database. The Continue will take you to the Current Page, but sending the Next Question Group to show.

Now, since a session record list will likely make the application quite slow, i'm looking for suggestions for a better solution, since neither i nor my team can think of any.

Thank you in advance
Hi Luis,

I'm sorry for the delay - as you may expect, we're all finishing the details for the NextStep event tomorrow :)

Do let me know, why are you saving the responses in a session variable, and not to the database? You can just mark all those responses as "disabled", and set them as "enabled" when the user finishes the survey. Actually, the "Enabled" - or whatever you choose to call that flag - should be handled on a different entity, maybe "SurveyResponse".

Does this suggestion address your concern? Of course I may not have the full picture here, but this could be one option.

Let us know how it goes!


Paulo Tavares
Hi Paulo Tavares, thanks for the response.

The reason i'm saving it in a session variable is because each answer is being given and saved in each of the respective Web blocks, meaning i can't fetch the answers received per web block without using a session variable, since there are no output variables in web blocks. I don't save them to the database because the user must be able to change the answer given freely, if i sent it directly to the database, it would mean that each time the user changes response, i had to go to the database and create/update/remove them (The removal happens in cases of a Multiple choice question, using Checkboxes).

Keep in mind that each page can have a lot of questions, meaning for each answer change in each question i had to go to the database.

I believe that this method makes the application even slower, but do let me know.