4 ms·
You're suggesting I call them "StateSynchronizer" or "ConstraintVerifier"?
by philbarr 15y ago
You're suggesting I call them "StateSynchronizer" or "ConstraintVerifier"?
- lallysingh 15y agoNo, I suggest you name it after what it actually does. "Controller" is a role that's only defined in terms of what it interacts with. It's essentially a declaration of rank with other types; it doesn't say anything about what functionality the class provides. If I'm looking at the components of the software, and I want some code to do X, or wonder what a class Y does, what does "Controller" tell me? If you're doing constraint verification (for example), my preference is to have a container (e.g. vector<>) of Constraint and just run find_if() to see when Constraint::Valid(environment) returns false. Then it's a class called ConstraintVerificationUtil and it has a single static method: VerifyList.
- deleted 15y ago[deleted]
- philbarr 15y ago"Controller" says to me that it's the where all the events are dealt with, so I can have one single place where events are handled. As for "ConstraintVerificationUtil", I personally feel that things that end in -Util are definitely worse than things that end in -er. Maybe that is just personal preference.