-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve organisation and naming of controllers and methods #5225
Comments
Thanks for opening this @theseanything 👍 The area that I think is most surprising is the start actions in the FlowController. I find it rather surprising that this doesn't return a start page as that's such a closely related concept. The other actions on the FlowController also seem to be a little surprising as they are named the same as Rails resources action names but don't perform in the same way. Convention would dictate that the they all have a resource id and used GET/PUT/DELETE methods respectively). I'd wonder if we can get the action naming closer to the domain of the flow? We could probably use I'd imagine since we do publicly offer I'd wonder with the remaining SmartAnswerController whether we'd want to separate that into a DevelopmentController for the index page, that is purely development? Then that'd leave just start page which could go in a StartPageController, I guess a single action of |
I think the original intention for the The
So now that start pages are rendered by Smart Answers. I wonder if start pages should be treated like first class nodes, rather than having special logic to handle them?
Yup - relating the action names back to domain model of Smart Answers seems sensible. Think
Yeah so my understanding of visualise is that it's primary use it to help people build or modify existing flows, not something intended for the wider public. So having under say a DevelopmentController, would help separate those concerns. Potentially we could have the following? FlowController
DevelopmentController
|
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
FlowController
@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.The text was updated successfully, but these errors were encountered: