Michael Long
Sep 14, 2024

--

Generally agree, and really like the "more specific implementation name" recommendation.

But do feel that sometimes (and especially in large apps), that suffix-based conventions are useful.

I would tend to use, for example, AddressBook for the common, public name for a piece of data, while AddressBookRecord might be the name given to the actual database record and AddressBookRepository might be the access point interface that manages them.

Those indicate areas of responsibility and are less likely to end up causing conflicts and/or miscommunications down the line. "Hey! What's this BookStore thing?"

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet