Controllers: plural
- For example:
UsersControllers
Models: singular
- A model representes one item, i.e. a record from a database. So:
User
orUserModel
.
On the flip side, if you build models with some sort of factory, then the factory name should be plural, i.e. UsersFactory
.
Database tables: plural
- Database tables hold multiple records. Therefore, you have a table of users, and not a table of user. It makes sense for the table name to then be plural.
As with everything programming–related, this is merely my personal preference. Don’t agree with something above? I’d love to hear why in the comments, as well as your own personal naming conventions.