IfYouSaySo
Well-known member
Ok, my question is not so much how to create the library, but how do you hide the implmentation details from clients? For example, lets say you have:
And now lets say that you expect clients to create instances of A, but B is only really used as an implementation detail of A. Also, I want to avoid making B a private class within A, because I have a small number of public classes (from the perspective of clients) and a relatively large number of classes that are simply implementation details. So if I were to take that approach, I would end up with a small number of absolutely huge files...
An idea I had was to make two DLL's, one that is the public interface, and the other that is the private details, and then only document the public one...
Any ideas on what is normally done?
VB.NET:
Namespace MyCodeLibrary
Class A
Public Sub DoSomething()
Dim x As New B
x.DoSomethingImplementation()
End Sub
End Class
Class B
Public Sub DoSomethingImplementation()
' Do whatever here
End Sub
End Class
End Namespace
And now lets say that you expect clients to create instances of A, but B is only really used as an implementation detail of A. Also, I want to avoid making B a private class within A, because I have a small number of public classes (from the perspective of clients) and a relatively large number of classes that are simply implementation details. So if I were to take that approach, I would end up with a small number of absolutely huge files...
An idea I had was to make two DLL's, one that is the public interface, and the other that is the private details, and then only document the public one...
Any ideas on what is normally done?