I know I will probably get a mixed opinion on this, but I was wondering if there were and “Best Practices” for model naming conventions.
I have a rather large application and I have adopted the following model naming convention:
- Models
- Add
- CategoryAddModel
- ProductAddModel
- Edit
- CategoryEditModel
- ProductEditModel
- View
- CategoryViewModel
- ProductViewModel
- Add
I was thinking of the following as well:
- Models
- Add
- AddCategoryModel
- AddProductModel
- Edit
- EditCategoryModel
- EditProductModel
- View
- ViewCategoryModel
- ViewProductModel
- Add
Which do you prefer, and why?
Do you think it really matters?
It doesn’t matter. You should name things in a consistent, logical, and straightforward way. Basically, just pick something that makes sense and makes you most productive. Consider how your naming convention would work with IntelliSense.
You might also want to consider how easy your code will be to maintain a year from now.