I am trying to maintain proper code organisation for my codebase. I came across a situation whereby organising my code into class A, B, C is unnecessary as class C can be incorporated into class A and B. This is because the functionalities in class C are from a library which means the functions have been wrapped nicely. Class A could be a thread that does callbacks, class C could be like a class that solely does processing. Basically, should I strictly follow the Single Responsibility Principle? What are the pros and cons of doing each method? I hope this is the right place to ask such questions.
So thanks to the link by Doc Brown, I am going to summarise what i have learnt: I would like to use two factors to decide
If your codebase is something that is supposed to be maintained for a long period or if it is a throwaway program would decide if you should use a strict Single Responsibility way of organising. In the case of it having to be maintained, it is recommended to wrap all the functions to customise to your code's objective and needs. This is because a third-party library is not customised to your needs all the way to the finest details. In the future, if you want to improve on the code, you can easily replace the libraries with better libraries or write your own optimised code. Also, it is easier for people to read as they do not need to look up those library APIs and simply need to refer to your code directly to understand what is going on.
If your code is highly dependent on those functionalities from the library you are using (in class C), you should always organise your code with each class performing a certain group of functionalities, even if it may seem to slow you down because it is easy to trace a problem when your code base gets too large. Also, it gets messy/untidy to read when a lot of those functionalities are incorporated. I would say this point can be subjective and when in doubt, just adopt a clear, organised way to think about the program, especially when coding with others.