--

Classes should have one axis for change

Classes can implement many interfaces

Interfaces mas have more than 1 realization (the original article thesis)

If you have a class with protocol you suspect will belong to the interface just segregate it when you have a second example class.

Creating one class and creating a new interface just related to the only class is a speculative code smell, IMHO

--

--

Maximiliano Contieri
Maximiliano Contieri

Written by Maximiliano Contieri

I’m a senior software engineer specialized in declarative designs. S.O.L.I.D. and agile methodologies fan. Maximilianocontieri.com

No responses yet