I’m struggling on how to name classes for use cases. Because I know that is “bad” to use verbs in classes names(Uncle Bob) but at the same time names of use case classes should explain what they do(Clean Architecture). So if I have an use case “create user” Is it ok to name it ” Class CreateUserUseCase” or how should I name it?
3
I would not tack “use case” or “interactor” on to the name. A name should not be cluttered with clues about where it goes or what kind of thing it is. It should just say what it is. It should leave me unsurprised by what I find inside. It should not dictate what the outside world around it is like.
If you have a class whose only job is to be the interactor in the user creation use case then a good name might be UserCreator or UserCreation.
BTW. The Use Case or UC classes you see in Uncle Bobs interactor layer in some of his videos (he’s called them other things) are not the names you’d use in a real project. Pick a name that means something in your code base.