This is personal preference, but in this case i think this might be a bit of a code smell. What do you want your CMSController to do? What methods are you using?
Is there a controller naming convention for an acronym?
Hello,
I'm trying to build the right habits and I am creating a controller for a CMS. What is the best practice to name it?
I know generally:
Controller class names use CamelCase and have Controller as a suffix. The Controller suffix is always singular. The name of the resource is usually plural.
More specifically, what happens in atypical case scenarios?
- For example, on a word like Moose (pl is Moose), I assume it would simply be MooseController.
- For an aconym it's a little less clear to me but would it be based upon the final word of the resource? i.e. I could see a controller on Compact Disks making sense to become CDsController. For a CMS however, I'm not really controlling multiple CMSs but rather the contents of one. I feel like CMSController makes more sense.
Is there a ruleset somewhere on this? Sorry if this is a bit pedantic, I know ultimately it doesn't make a difference and already went with CMSController.
Thanks!
yeah and plus you can always refactor down the road once you get a hang of things. There really is no "wrong" way to do things ... for the most part haha
What i would suggest though is to give Adam Wathan's talk a watch, really good overview on how to do controllers IMO https://streamacon.com/video/laracon-us-2017/day-1-adam-wathan Keeps things clean and easy to manage down the road
Please or to participate in this conversation.