Description
As discussed in #5212, we'd like to improve the organisation and naming of the controllers and their methods. After that ADR has been implemented we will have the following controller structure:
SmartAnswerController
- index (Index page)
- show (Start page)
- visualise (Visualisation page)
FlowController
- start (Redirect to the first flow question)
- show (Question and outcome pages)
- update (Redirect to next question or outcome)
- destroy (Clear responses and redirect to start page)
@kevindew raised that it is confusing having "SmartAnswersController" and "FlowController", as it unclear what each is responsible for. This may be further exacerbated by the concepts "Smart Answer" and "Flow" not having been strictly defined or existing conflicting usage.
The other change proposed was moving the visualise
method from SmartAnswerController to the FlowController, due to it being publicly available in production environment. Start page and index pages are not rendered or accessible from Smart Answers in production. However, it's not clear whether visualise is a feature we support for public use, outside its primary use as a tool to help flow development.