Interfaces with only one method and one implementation always seem awkward to me. I felt it in my gut but wasn't able to articulate what's exactly wrong with them. Luckily, recently someone showed me another way of solving this issue. Fake abstractio...
Markdown supported · ⌘↵ to post
Daniele Maccari
Now this is an interesting approach. However, I wonder what would happen if you had some interface which is actually meant to represent a set of cohesive facets of behaviour, i.e. a role proper. Would you consider that a proper abstraction? I also fail to see exactly how you would inject all those delegates into your high level component/use case/service/whatever. Would that not pollute it? Of course, that might be pointing to refactoring some these deps out into their own service. But then you're back at the beginning, ain't you?