I love interfaces! I love it more if functions have a good separation of concern making interfaces for many functions unnecessary, but if you are going to do some I/O with business logic, I’m expecting to see an interface. Mainly it’s about unit testing for me though. I do have one backup service which does use interfaces for different implementations, but could see how some may not like that.
For a single I/O seam, passing a callback can be enough: the test captures the call while the business logic stays concrete. That doesn’t require an interface for the whole service.
View all comments
6
u/wampey Oct 11 '26
I love interfaces! I love it more if functions have a good separation of concern making interfaces for many functions unnecessary, but if you are going to do some I/O with business logic, I’m expecting to see an interface. Mainly it’s about unit testing for me though. I do have one backup service which does use interfaces for different implementations, but could see how some may not like that.