This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
Refactor controller names (please review, but don’t merge yet) #137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I had a quick idea to resort the modules below Coocook::Controller. Please review: Primarily is that an enhancement? Technical review might not be that important because tests pass and I am pretty sure it’s complete. Please see below for open question.
The thing is our controllers which handle project-specific data were spread all over the controller namespace. Some of them would chain from
/project/base
and others not.Before
Can you spot the project-specific controllers?
After
Open question
In classic Catalyst logic we have
Project.pm
andProject/
with submodules next to each other. This is all project-specific.Then the are the
Browse
modules like I named them. There are not about 1 project but exploring all Coocook data. That is:Current state of this PR
Solution 0:Project::Project
controllerThat name reads like a mistake.
Solution 1:
Root
controllerThis is also what Catalyst does for the application’s main controller
MyApp::Controller::Root
.Solution 2: explicit namespace for project-specific controllers
Optional next step: dissolve
Controller::Browse
namespaceDid you ever dislike the
Browse
namespace? It’s pretty generic andPOST
actions are not like “browsing”.