It may be on the “discussed” side, but I would really like to hear your opinion about it.
Earlier, I often wrote data access classes that processed both reading and writing, which often led to a bad name, for example, FooIoHandler, etc. The rule of thumb that classes that are difficult to name is probably poorly designed suggests that this is not a good solution.
So, I recently started sharing data access in FooWriter and FooReader, which leads to nicer names and gives additional flexibility, but at the same time I kind of support them together if the classes are not big.
Does the reader / writer share the best design, or should I combine them? If I have to combine them, then what the hell should I call a class?
Thanks / Erik
source share