Re:Performance Tuning for .NET Core
by radicalbyte on Wednesday January 16, 2019 @03:55AM
(#18919256)
Usually you define an interface for anything that you want to be overridable and provide some way for consumers to provide their own implementations. Then seal your own implementations.
Then you only need to design your interfaces in such a way that they can easily be implemented by composition.
This is the approach taken in ASP.Net and in WCF; although the latter does a really bad job at making their interfaces user friendly (for even tiny changes you have to re-implement a lot of functionality - which could have been avoided by better interface design).
The overarching principle is to keep the API as tight as possible, because as soon as an API is public, you have committed to it and even subtle changes in observable behavior may break some client.