Rails typically has a very specific format for naming models, controllers, and views, which is not always the only way to complete a task. Rails tradition:
- Singular models (i.e. history)
- Plural controllers (i.e. stories)
- Views are sorted by folder according to the name of the controller (e.g. stories / show.html.erb)
Django seems to use a similar convention with:
- Models are singular
- "views" (which are mainly controllers) are not necessarily tied to a specific model.
- "templates" do not contain a separate agreement, although some of them exist.
Since CakePHP (especially) seems to be behind every Rails, I expect it to follow the same convention.
Regarding the exception, I would suggest that it is related to URL routing. Before Rails 2.3 (I think), Rails routes were automatically set based on the name of the controller (now the router has much more flexibility). Although they could be changed, most people chose not to get confused on the router. I would rather visit yourwebsite.com/user/ to visit my homepage on the login website than yourwebsite.com/users/22.
Remember : agreements exist for some reason, but there are times when agreements are violated reasonably. Keep the “configuration convention” only when it makes sense.
source share