How do you name your classes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do you name your classes?

I‘ve heard that the best way to write cleancode is to use special class names. But it‘s important to note that all class names never should end with „er“ like the typical name „controller“ or something like that. So how you guys name your classes? Do you think it important to pay attention to the naming? If yes do you have any tips?

8th Feb 2019, 5:05 PM
Daniel
2 Answers
+ 2
Name classes is points to the code, if I want to name I should take a creative subject to speak about it in code
8th Feb 2019, 7:15 PM
rokia atia
+ 2
I stick to the convention to start them with a capital letter. Besides of that, the usual: Telling names. Usually a noun, because most of the time a class models a 'thing', right? (While methods or functions model action, so verbs are a better fit.)
8th Feb 2019, 9:59 PM
HonFu
HonFu - avatar