Tag Info

New answers tagged

0

Do both If you are making a framework, flexibility is key. Most frameworks provide interfaces and default implementations along with empty constructors wired to defaults, but allow for you to overwrite behavior by passing in your own implementations, or passing in a framework-provided alternative implementation. public interface IReader { string Read(); } ...


0

But what if my IClientBuyHistory needs to access an interface of another component ( e.g. access the IBuyHistory interface from Client Data Manager component)? How could I ensure that those components must be used together? At best, not at all. The point of an interface is that it is not tied to a class, which would be a concret implementation of it. ...


0

I would probably be more in favor of making an implementation per interface, and injecting them in ClientSystem methods, in order to benefit from inversion of control. class ClientSystem { void method1(IClientBuyHistory clientByHistory) { /* ... */ } void method1(ICallClient callClient) { /* ... */ } } This let the client implements only what is ...


0

I tend to work most with web applications and even though I'm trying to be general, my answer might not apply to your area of programming. I am also going to use "framework" synonymical with "library". Before implementing a framework, one must consider a few things, here are a few general examples. #1. Will the framework save time and effort? The ...



Top 50 recent answers are included