Let’s say I have “settings” classes in my controllers and models, in my Java/Spring/MVC webapp. Now, in both /controllers/ and /models/, should I…
1) …name them both Settings.java?
2) …name them SettingsController.java and SettingsModel.java or something similar?
I’m curious about typical naming conventions as well as naming conventions used in your personal experience that worked well. Feel free to reference your own webapp project in place of my, perhaps poor, example.
This is my first MVC webapp, and I’m trying to get a feel for it.
I’d suggest you to call your controller
SettingsControllerand model justSettings. It is because model actually contains you data. What kind of data does your model contain? The answer is: settings. So, call it settings.Controller is different story. It is a class that deals with you data. There are probably many classes that deal with settings:
SettingsBuilder,SettingsFactory,SettingsUtil,SettingsServiceetc. This one is controller, so call itSettingsController.