loading...

Discussion on: How to name you're interface

Collapse
tschaka1904 profile image
Maximilian Koch

When looking into books that teach OOO, I remember that the I for interface before the name was always taught as a (good) practice. In reality, I haven't come across any application where this naming pattern is actually used.

Usually the interface has a very generic name, Report.

interface Report { /**define you're method**/}

class AReport implements Report { /**define you're method**/}
class BReport implements Report { /**define you're method**/}

To my mind this seems sufficient and perfectly fine. That said, as long as you stay consistent with your naming strategy almost all patterns are fine.