Class name notation

  • Thread starter Thread starter Gaetan
  • Start date Start date
G

Gaetan

Hello
I have a tiny problem about naming convention. When i read msdn, they
says how to give a name to the internet (IThing), and to the class
(Thing)... but i like abstract classes to factorize methods used in
many inherited class... So i don't really know how to name them since
i didn't find anything in msdn or anywhere else...
I've tryed : ThingSkeleton, AThing (like IThing), ThingAbs,
ThingFactor... but nothing really suits me...

IThing
^
|
ThingSkeleton
^_________
| |
AThing AnOtherThing ...

So i would like to know what the pros use...

Thanks

Great A'Tan.
 
many inherited class... So i don't really know how to name them since
i didn't find anything in msdn or anywhere else...
I've tryed : ThingSkeleton, AThing (like IThing), ThingAbs,
ThingFactor... but nothing really suits me...

For abstract base classes, for me, it depends on the context. Sometimes I
will give them no extension (eg. simply 'Thing') and sometimes I append the
word 'Base' to the end (eg. 'ThingBase'). I haven't used anything else for
abstract classes.
 
Yeah I generally choose to put Base at the end of the name for abstract
classes. It depends whether the abstract classes will be significantly
referenced in code... if that's the case, I'd give the abstract class the
name I'd want to see in code, and give the implementation class an 'Impl'
suffix.
 
Back
Top