The Survey

An overview of what we are going to build in this chapter.

Description

Great companies know what their customers think, and Pento should be no different. We want to build a survey tool. Let’s build a survey tool that tracks what our customers think about us over time. Our data scientists will want to slice and dice those results by several essential demographics.

Requirements

A sure way to irritate our customers is to ask the same demographic questions each time, so we’ll ask demographic questions once. Then, we can ask a few short non-demographic questions multiple times and track those responses over time.

We’ll build a survey feature that asks a user to fill out a survey to review our products to satisfy these requirements. The survey will consist of a demographics section in which we ask a user to fill out a few basic questions about themselves. Then we will ask the user to rate each product on a scale of one to five stars. Logged-in users will be able to visit /survey and fill out the survey.

Our survey will be dynamic. First, it will prompt the user to fill out the demographics section. Only when that section has been successfully completed will we reveal the product rating sections.

How is it going to work?

Here’s how it will work.

When no demographic exists for the user, we will show just the demographic portion of the survey, like this:

Get hands-on with 1400+ tech skills courses.