This question: https://stackoverflow.com/questions/1866794/naming-classes-how-to-avoid-calling-everything-a-whatevermanager contains many examples of suffixes and prefixes that can be used to come up with precise name for your class.
What about methods? For example, how to name a method that should execute some action upon validation of some state –
ExecuteIfSomething, if we imagine that some transition in state should be executed after checking if something is true –
ValidateTransition (kind of ok, but reading it makes me think that it should just validate something – not additionally execute some action),
It would be very useful to have list of common parts that can be added to action/topic/… to describe method.
Here are some that I can come up with at the moment:
Maybe, I have put too many of them.
As you can see now – many if not almost all verbs can be used depending on the situation. Using them or finding the matching one shouldn’t be a problem. The problem is on how to combine them or use some of them to describe complex situations or complex executing sequence. The one I have described as an example is the most common one that I haven’t found a good solution for. Personally I am interested in this particular one. But having some way/approach (not a formula like
Action + …) to define/come up with method/function names can be very useful.
Main question here is how do you name a method as the one described in the example? It might seem to be a duplicate of this question – Meaningful concise method naming guidelines – I can clarify and update my question if that is going to be required.