tag:blogger.com,1999:blog-6818189468244276547.post2330940420866210861..comments2023-10-10T15:54:46.212+01:00Comments on Quoi qu'il en soit: Java, PowerMock and the slow death of pointless InterfacesTimAhttp://www.blogger.com/profile/03169884264169945941noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6818189468244276547.post-11536371993478823882012-05-06T13:43:12.464+01:002012-05-06T13:43:12.464+01:00Interface Segregation Principle (ISP)
The dependen...Interface Segregation Principle (ISP)<br />The dependency of one class to another one should depend on the smallest possible interface.TimAhttps://www.blogger.com/profile/03169884264169945941noreply@blogger.comtag:blogger.com,1999:blog-6818189468244276547.post-73295993960137221912012-05-06T13:41:24.752+01:002012-05-06T13:41:24.752+01:00Fair point, but I'd argue that the simplesst p...Fair point, but I'd argue that the simplesst possible "interface" to the dependency is defined by suitable use of public vs private/protected methods in the concrete class. ("interface" in this context is used in the generic sense)TimAhttps://www.blogger.com/profile/03169884264169945941noreply@blogger.comtag:blogger.com,1999:blog-6818189468244276547.post-14069901388764910102012-05-06T13:28:16.402+01:002012-05-06T13:28:16.402+01:00YAGNI needs to be weighed against ISP however. It...YAGNI needs to be weighed against ISP however. It can payoff to decouple large classes with a small interface for refactoring and understanding later. Needing to mock static or private methods can be a code smell but I agree not in all cases.Garrett Hallhttps://www.blogger.com/profile/09443991737102883235noreply@blogger.com