As the size of my project becomes larger, I feel there should be a convention for class names that have similar functionality.
Let's assume that there are three data handlers having similar functionality, and the only difference is the data type they handle.
There is interface DataHandler.
interface DataHandler
There are three different types of data, Bitmap, Video, and Sound.
Which option is more widely-used naming convention?
class BitmapHandler
class VideoHandler
class SoundHandler
class DataHandlerBitmap
class DataHandlerVideo
class DataHandlerSound
I am currently using option 1 since it sounds better, but I think using option 2 also has advantages, especially the size of project is large. I can easily check how many data handlers exists by sorting class names alphabetically, and it also makes people can easily figure out and use all similar type of classes using IDE's intellisense.
EDITED
I removed c# tag. I couldn't think that C# and Java have different naming conventions.
First of all, the naming convention for an interface would be
IDataHandler
Then, your classes should be:
class BitmapDataHandler
class VideoDataHandler
class SoundDataHandler
In any case, I believe option #2 is not so relevant; in order to discover classes in your project use the Find all References command (for example, if you don't use ReSharper which makes things much more easier).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With