Skip to content

KevinFalank/SurveyDBC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Step 1: Wireframing

  1. '/' Index page:
    • navigation: login/signup -when user is logged in, the nav changes to account management, create survey, and logout
    • Shows a list of all surveys -Each survey shows -Survey creator, -Survey created -Survey count -Survey is a link to the page for that survey This is sorting somehow.

Kevin will teach partials, and also will help us make the login form modal.

  1. '/login' (partial)
  • login form
  • username
  • password
  • submit buton
  1. '/signup' (partial)

    • copy of sign-in
  2. '/users/user_id/account_management'

  • nav bar
  • landing page for reporting and statistics
  • ignore user profile (don't change name or password)
  • list of surveys created
  1. 'Statistics page for surveys' -This is a dummy page

  2. 'What is the resful way to create page route'

  • Survey has a name
  • Survey has a list of already created questions
  • Survey has a question form
    • Question
    • Set of answers
  • Create Question button
  • Kill survey button
  1. 'survey/id '
  • Display survey
    • submit button
  1. Thank you for taking survey!
  • Button that redirects to main page

#Schema

  1. Users
  • id
  • name
  • password
  • timestamps
  1. Survey
  • title
  • created_at(timestamp)
  • user_id
  1. Question
  • survey id
  • content
  1. Possible Answers table
  • question_id
  • text
  1. Participant
  • user_id
  • survey_id
  1. Results
  • participants_id
  • answers_id

#Survey Gorilla Challenge

We're going to build a survey application that lets users create their own multiple-choice polls and other users to vote in them.

This is going to use a combination of pure JavaScript and AJAX to achieve the desired effects.

A survey will have many questions. Each question will have many possible responses. A voter will select one (and only one) response for each question in a survey.

##Objectives

###Models Go back to the polling schema challenges. This schema will be fairly complex and it will help to think in terms of survey-creators versus survey-voters.

There should be at least 6 core models/tables. You'll need a table to hold rows that represent the following sort of facts:

  1. User A exists
  2. User A created Survey X
  3. Question Y belongs to Survey X
  4. Possible Choice Z belongs to Question Y
  5. User B completed Survey X
  6. User B chose Possible Choice Z for Question Y

Each of these should correspond to a single table in your database and a single model in your app.Users need to be signed in to create a survey and vote in a survey.

###Wireframes Work through wireframes and discuss what your core pages are and what your core user flows are.

There should be two core flows: survey creation and survey completion. One possible division of labor would be to separate these two flows.

###Survey Creation Users will want to create their surveys in "one go" by adding multiple questions and choices per question on a single page. This is an opportunity to create some fun dynamic forms. Check these out:

Google "jquery dynamic form fields" to find more.

To start and for your own sanity, maybe limit each survey to a single question. Create a version with a single question per survey working first and add support for multiple questions later. Surveys should also have an optional image associated with them. [CarrierWave] (https://github.com/jnicklas/carrierwave) is your friend; you'll come to love it with time.

###Survey Taking

For now, a user has to answer every question in a survey. You should be able to implement this constraint using a single custom validation on a single model.

###Survey Results

Create a nice page that shows the survey creator the results of a survey. If you want to do something fancy, try using d3.js. This is very advanced. There are other charting libraries like Flot or [Highcharts] (http://www.highcharts.com/).

At the very least, create some simple HTML bar charts by having percentage-width divs with a fixed height and solid background color so that we can see how people responded for each question in a particular survey.

###Advanced Features

If you're looking for more advanced features, how about something that lets a user view a survey without logging in but pops up a modal dialog to prompt a user to sign in/sign up right before they vote?

How about more advanced visualizations, like time series? How about focusing on making the user interface really nice? How about multiple question types?

About

Survey Crud App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published