Java interface and implementation naming (or “I” or “Impl”)

How do I name my interfaces and the classes that implement my interfaces? Through much research on the internet and my own gut feelings, this is what I reckon:

I never prefix my interfaces with “I”. The value of coding to interfaces is that you can swap out the implementation with minimal hassle. It means that instead of using implementation specific class names in your code, you use interface names instead – right? So, if I’m going to be using interface names everywhere, I don’t want to have to prefix everything with “I”. Coding to interfaces is a best practice, so I don’t need to explicitly state that I am doing it…It should just happen – which makes the “I” prefix redundant.

Furthermore, the “Impl” suffix is also redundant. Yes, indeed, your dilemma isn’t as simple as picking between the two. Firstly, “Impl” doesn’t translate. “Impl” in other languages has no meaning, and yes I’m talking about Polish and Scala. In Polish (according to Google translate), “implementation” is “realizacja” and in Scala, there are no interfaces. The closest thing Scala has to interfaces is traits, which can contain implementation specific code. So really, everything is Scala is an implementation, so why you use “Impl” suffix?

Secondly “Impl” is restrictive. What happens when you want to add another implementation of Foo? You gonna call it “FooImplImpl”? “AnotherFooImpl”? “FooImpl2″? I didn’t think so. Perhaps you were going to just call it “FooImpl” and put it in a different package…

Thirdly “Impl” doesn’t convey any meaning about what the implementation is. You wouldn’t create an “AnimalImpl” would you? You’d create a “Lion” or an “Elephant”. There is almost always something that distinguishes your implementation that you can use in the class name. Even if it is a long name, it doesn’t matter – you’re coding to interfaces (remember?), so you’re rarely going to see that class name.

Lastly, and probably most importantly – you still can’t think of a name? You don’t need an interface. If you really can’t think of a name, your class must be generic enough to not need an interface and you’re probably not going to have any other implementations. Your class methods become the interface contract, and that is that.

1,916 thoughts on “Java interface and implementation naming (or “I” or “Impl”)

  1. Thinking on my experience in virtual gambling I’ve come to see that modern platforms have completely transformed the way players enjoy games . Personally I think that the house edge tend to be totally volatile which makes me think proper budget control is the real key in this hobby. By the way I stumbled upon this useful resource url=https://telegra.ph/Seguridad-y-C389xito-en-el-Juego-Online-Encuentra-el-best-online-casino-Ideal-06-08https://telegra.ph/Seguridad-y-C389xito-en-el-Juego-Online-Encuentra-el-best-online-casino-Ideal-06-08/url https://telegra.ph/Seguridad-y-C389xito-en-el-Juego-Online-Encuentra-el-best-online-casino-Ideal-06-08 where people share different betting strategies and it has quite helpful to keep my risks low . Something I always tell myself is to never chase bad runs because that’s usually how the fun goes wrong . Recently Ive also wondered whether the stream dealer options genuinely provide a more authentic vibe compared to regular digital versions. What do you guys opinions on this and have you found any reliable trends lately ? Let’s discussion going in this thread

  2. Thinking about it in online gaming Ive recently observed how new casinos are shifting the method users enjoy games . Honestly it seems that the odds are often all over the place which makes me think proper budget control is the real key nowadays . By the way I found this useful source url=https://telegra.ph/Collection-et-C389valuation-des-Casinos-en-Ligne-France-pour-une-ExpC3A9rience-Optimale-06-08https://telegra.ph/Collection-et-C389valuation-des-Casinos-en-Ligne-France-pour-une-ExpC3A9rience-Optimale-06-08/url https://telegra.ph/Collection-et-C389valuation-des-Casinos-en-Ligne-France-pour-une-ExpC3A9rience-Optimale-06-08 where people talk about various tactical systems and it’s been quite insightful for keeping my risks under control. Something I regularly tell others is to avoid trying to track bad runs because its almost always when everything goes wrong . Lately Ive also wondered if the real-time dealer options truly provide a fairer vibe than standard RNG software . How do you all feel about that and have you found any reliable trends recently? Would love to discussion going in this thread

  3. Thinking on my experience in online gaming I’ve noticed that modern platforms are shifting how players experience tables. Honestly it feels like the payouts can be totally volatile which makes me think proper budget control is incredibly crucial in this hobby. On another note I ran into this awesome review page url=https://telegra.ph/El-Artista-del-Azar-y-la-Experiencia-Online-Casino-en-MC3A9xico-06-08https://telegra.ph/El-Artista-del-Azar-y-la-Experiencia-Online-Casino-en-MC3A9xico-06-08/url https://telegra.ph/El-Artista-del-Azar-y-la-Experiencia-Online-Casino-en-MC3A9xico-06-08 where players talk about various betting strategies and it’s been surprisingly insightful to keep my losses low . Something I always tell myself is to avoid trying to chase losses because that tends to be how things goes wrong . Recently Ive also been thinking whether the real-time dealer tables truly provide a more authentic vibe than standard digital software . What are your thoughts on this do you prefer slots or cards ? Would love to start a here in the comments

  4. Thinking about it with digital gaming Ive recently noticed that current casinos are really changing how we experience slots . In my opinion I think that the payouts are often all over the place which is why careful bankroll management matters most nowadays . On another note I checked out this awesome review page url=https://telegra.ph/Le-Domaine-Paisible-du-casino-en-ligne-et-la-SC3A9curitC3A9-des-Joueurs-FranC3A7ais-06-08https://telegra.ph/Le-Domaine-Paisible-du-casino-en-ligne-et-la-SC3A9curitC3A9-des-Joueurs-FranC3A7ais-06-08/url https://telegra.ph/Le-Domaine-Paisible-du-casino-en-ligne-et-la-SC3A9curitC3A9-des-Joueurs-FranC3A7ais-06-08 where users talk about different winning systems and it has quite valuable to keep my losses down . One thing I always tell myself is to avoid trying to run after losses because that’s usually when things gets messy . Recently Ive also been thinking whether the real-time dealer options actually provide a more authentic vibe compared to regular digital software . What do you guys opinions on this and have you found any good patterns recently? Lets get a debate here in the comments

  5. Thinking on my experience around digital betting I have observed how current sites are shifting the method we play tables. In my opinion it seems that the odds tend to be all over the place which proves that proper bankroll control is incredibly crucial in this hobby. That said I ran into this useful resource url=https://telegra.ph/Excepcional-y-Diverso-casino-online-bono-sin-depC3B3sito-para-Jugadores-Mexicanos-06-08https://telegra.ph/Excepcional-y-Diverso-casino-online-bono-sin-depC3B3sito-para-Jugadores-Mexicanos-06-08/url https://telegra.ph/Excepcional-y-Diverso-casino-online-bono-sin-depC3B3sito-para-Jugadores-Mexicanos-06-08 where people talk about different winning strategies and I found it surprisingly helpful to keep my losses down . Something I constantly remind myself is to never chase bad runs because that tends to be how the fun goes wrong . Over the last few weeks Ive also wondered if the stream dealer tables truly offer a fairer chance than classic digital versions. What are your thoughts on this and have you found any solid trends recently? Would love to start a going in the comments

  6. Thinking over my time around online gambling I’ve observed how current platforms are absolutely changing the method we enjoy games . Personally it feels that the odds tend to be all over the place which makes me think proper budget management is the real key nowadays . That said I ran into this interesting review page url=https://telegra.ph/HipocresC3ADa-Revelada-Descubre-el-Emocionante-Mundo-del-caliente-casino-online-06-08https://telegra.ph/HipocresC3ADa-Revelada-Descubre-el-Emocionante-Mundo-del-caliente-casino-online-06-08/url https://telegra.ph/HipocresC3ADa-Revelada-Descubre-el-Emocionante-Mundo-del-caliente-casino-online-06-08 where players discuss different tactical tips and it has really helpful to keep my risks low . A major point I constantly remind newbies is to never chase bad runs because its almost always how the fun turns bad. Over the last few weeks Ive also wondered if the real-time croupier tables genuinely provide a better experience than classic digital software . What are your thoughts on this and have you noticed any solid trends lately ? Would love to chat going below

  7. Thinking on my experience around digital gambling I have realized how new casinos are totally changing the method players play games . Honestly it seems that the payouts are often all over the place which proves that proper bankroll management is the real key nowadays . That said I found this useful source url=https://telegra.ph/Resolute-Strategies-for-Aviator-Success-Leveraging-the-aviator-predictor-apk-06-08https://telegra.ph/Resolute-Strategies-for-Aviator-Success-Leveraging-the-aviator-predictor-apk-06-08/url https://telegra.ph/Resolute-Strategies-for-Aviator-Success-Leveraging-the-aviator-predictor-apk-06-08 where users talk about various betting strategies and it’s been quite insightful for keeping my spending low . A major point I regularly advise others is to avoid trying to track bad runs because that tends to be how everything gets messy . Over the last few weeks Ive also started questioning whether the stream croupier options genuinely give a better experience compared to classic RNG versions. What’s your take on this whole thing do you stick to slots or tables? Let’s debate going below

  8. Thinking back around online betting I have come to see that the latest sites are shifting the way players experience games . Personally it feels like the odds can be super random which is why proper bankroll control matters most nowadays . By the way I ran into this interesting platform url=https://telegra.ph/Collection-et-C389valuation-des-Casinos-en-Ligne-France-pour-une-ExpC3A9rience-Optimale-06-08https://telegra.ph/Collection-et-C389valuation-des-Casinos-en-Ligne-France-pour-une-ExpC3A9rience-Optimale-06-08/url https://telegra.ph/Collection-et-C389valuation-des-Casinos-en-Ligne-France-pour-une-ExpC3A9rience-Optimale-06-08 where players talk about different winning systems and it’s been surprisingly insightful for keeping my spending under control. A major point I always advise myself is to never chase losses because its almost always how things gets messy . Lately Ive also been thinking whether the live croupier tables truly provide a fairer chance than standard digital versions. What do you guys views on this and have you found any solid patterns lately ? Let’s chat going in the comments

  9. Thinking back in digital gaming I’ve noticed how current platforms have completely transformed the method players play games . In my opinion it feels like the odds are often all over the place which proves that proper budget management matters most these days . By the way I stumbled upon this interesting source url=https://telegra.ph/Radiant-et-Virtuose-casino-en-ligne-lEssor-dune-ExpC3A9rience-de-Jeu-InC3A9galC3A9e-06-08https://telegra.ph/Radiant-et-Virtuose-casino-en-ligne-lEssor-dune-ExpC3A9rience-de-Jeu-InC3A9galC3A9e-06-08/url https://telegra.ph/Radiant-et-Virtuose-casino-en-ligne-lEssor-dune-ExpC3A9rience-de-Jeu-InC3A9galC3A9e-06-08 where users discuss various tactical systems and it has surprisingly helpful to keep my spending low . One thing I regularly advise newbies is to never run after losses because its almost always how everything goes wrong . Recently Ive also started questioning whether the stream dealer tables truly give a better vibe than regular RNG versions. What’s your take on this whole thing and did you noticed any good patterns lately ? Let’s discussion here in the comments

  10. Thinking over my time with virtual betting Ive recently come to see that the latest sites are really changing the method users play slots . To be fair it feels like the odds tend to be all over the place which proves that careful bankroll management is the real key in this hobby. By the way I checked out this cool source url=https://telegra.ph/Preoccupare-la-Fortuna-Esplorando-i-non-aams-casino-con-Prelievi-Veloci-e-Massima-Sicurezza-06-08https://telegra.ph/Preoccupare-la-Fortuna-Esplorando-i-non-aams-casino-con-Prelievi-Veloci-e-Massima-Sicurezza-06-08/url https://telegra.ph/Preoccupare-la-Fortuna-Esplorando-i-non-aams-casino-con-Prelievi-Veloci-e-Massima-Sicurezza-06-08 where people discuss different tactical tips and it has really valuable to keep my spending down . Something I regularly tell others is to avoid trying to chase losses because that’s usually when things goes wrong . Over the last few weeks Ive also started questioning if the real-time dealer tables genuinely give a more authentic vibe than standard digital software . What are your thoughts on this and have you noticed any good patterns lately ? Would love to chat here in this thread

  11. Thinking about it in virtual wagering I’ve noticed how new platforms have completely transformed how users enjoy games . To be fair I think like the payouts can be super random which proves that smart budget management matters most nowadays . On another note I checked out this cool platform url=https://telegra.ph/Adresse-und-Strategie-chicken-road-2-fC3BCr-Crash-Game-Enthusiasten-06-08https://telegra.ph/Adresse-und-Strategie-chicken-road-2-fC3BCr-Crash-Game-Enthusiasten-06-08/url https://telegra.ph/Adresse-und-Strategie-chicken-road-2-fC3BCr-Crash-Game-Enthusiasten-06-08 where users share different winning systems and it has surprisingly insightful for keeping my risks down . Something I always advise myself is to avoid trying to run after losses because that’s usually when things turns bad. Over the last few weeks Ive also wondered if the stream dealer tables actually give a fairer experience compared to regular RNG versions. What do you guys opinions on this and did you noticed any reliable patterns lately ? Lets get a start a here in the comments

  12. Thinking over my time with online wagering I’ve realized that current casinos are totally changing how users enjoy slots . Honestly it seems like the house edge can be all over the place which proves that proper budget management is vitally crucial these days . Anyway I checked out this interesting resource url=https://telegra.ph/Resolute-Strategies-for-Aviator-Success-Leveraging-the-aviator-predictor-apk-06-08https://telegra.ph/Resolute-Strategies-for-Aviator-Success-Leveraging-the-aviator-predictor-apk-06-08/url https://telegra.ph/Resolute-Strategies-for-Aviator-Success-Leveraging-the-aviator-predictor-apk-06-08 where users discuss various tactical strategies and it has really valuable to keep my losses low . A major point I constantly tell newbies is to never chase bad runs because its almost always when everything turns bad. Recently Ive also wondered if the live croupier tables actually offer a more authentic experience compared to regular digital versions. What’s your take on this whole thing and have you noticed any solid trends lately ? Would love to chat here in this thread

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>