Skip to content

Instantly share code, notes, and snippets.

@lancewalton
Last active November 5, 2015 09:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lancewalton/f566f75e62feb563ef6f to your computer and use it in GitHub Desktop.
Save lancewalton/f566f75e62feb563ef6f to your computer and use it in GitHub Desktop.
We need a questionnaire model that can:
* Support different answer types
* Support validations that can depend on the answers to other questions
* Support different forms of rendering (e.g. the questionnaire needs to be renderered using HTML, JSON, etc.) with / without the answers
* Answers need to be persisted and recovered from persistence. JSON persistence is acceptable.
* Support having conditional parts of the questionnaire based on previous answers
Needless to say, it must be typesafe
Different types of answers are things like: Dates, Addresses, Lists of Addresses, Phone Numbers, Lists of Phone Numbers, Strings, Enumerated values, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment