docs/architecture/adr/0004-naming-conventions-for-interfaces-and-their-implementations.md
When there's an interface that has multiple implementations it's often easy enough to give meaningful names to both the
interface and the implementations (e.g. the interface Backend with the implementations ImapBackend and
Pop3Backend). Naming becomes harder when the interface mainly exists to allow having isolated unit tests and the
production code contains exactly one implementation of the interface.
Prior to this ADR we didn't have any naming guidelines and the names varied widely. Often when there was only one
(production) implementation, the class name used one of the prefixes Default, Real, or K9. None of these had any
special meaning and it wasn't clear which one to pick when creating a new interface/class pair.
We'll be using the following guidelines for naming interfaces and their implementation classes:
DatabaseMessageStore or InMemoryMessageStore for the MessageStore interface.AndroidPowerManager.K9 for K-9 Mail and Tb for Thunderbird when app-specific
implementations are needed, e.g. K9AppNameProvider and TbAppNameProvider.Default, like DefaultImapFolder.