Comment on JVM Anatomy QuarksparentComments−lupire1yIf you are rigorous as to make classes final, you should also be rigorous to never provide a non-interface as an Application Programming Interface.Google uses mocks and fakes implementations of interfaces, and provides dependency injection frameworks for managing these (Guice and Dagger).−stickfigure1yI once worked with a guy who obsessively made interfaces for every java class. Even domain objects. He was extremely proud of this.It was garbage.−redditor986541yWas this in Amazon? If so, it might have been me. Sorry about that. I have learnt my lesson now.I don’t recall doing it for domain objects though.
Comments
If you are rigorous as to make classes final, you should also be rigorous to never provide a non-interface as an Application Programming Interface.
Google uses mocks and fakes implementations of interfaces, and provides dependency injection frameworks for managing these (Guice and Dagger).
I once worked with a guy who obsessively made interfaces for every java class. Even domain objects. He was extremely proud of this.
It was garbage.
Was this in Amazon? If so, it might have been me. Sorry about that. I have learnt my lesson now.
I don’t recall doing it for domain objects though.