3 ms·
The source of his post seems to be a use of interfaces in DDD and DI. I also use a lot of interfaces there together with generic interfaces and base classes. T
by NicoJuicy 10y ago
The source of his post seems to be a use of interfaces in DDD and DI. I also use a lot of interfaces there together with generic interfaces and base classes.
The author did forget, that all interfaces can be DI'd when the class is an implementation of IService ( or IRepository), so you don't have to specify all classes seperately.
This should make it more obvious: http://simpleinjector.readthedocs.io/en/latest/advanced.html#batch-registration http://simpleinjector.readthedocs.io/en/latest/advanced.html...
And
http://stackoverflow.com/questions/15581505/generic-abstract-base-class-from-generic-interface http://stackoverflow.com/questions/15581505/generic-abstract...
For the rest, I agree to use interfaces when appropriate. But I'm not sure this post adds a lot of value to be on HN. Perhaps it's because I'm a c# developer and this should be basic knowledge in that domain ( eg. Books and Stack overflow). Can someone elaborate on that?