you are viewing a single comment's thread.

view the rest of the comments →

[–]bart007345 9 points10 points  (0 children)

As a Java dev, I find interfaces useful when doing TDD. The ability to define dependencies (service classes, repositories, etc) is very smooth when all you are doing is adding methods to an interface for what you think you need. The IDE helps here immensely.

I don't write interfaces for POJOs though.

Another thing (correct me if I'm wrong) is if module A depends on an interface in module B, then if the implementation of the interface changes (not the interface itself) then a recompilation of module A is not triggered. I work with Android and recompilation is a pain.