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.
Экспертная консультация при выборе сплавов помогает клиентам оптимизировать затраты и избежать технологических ошибок. https://rms-ekb.ru/catalog/stalnoi-list/list-stalnoi-3kh1000kh3000-mm-1-4541-en-iso-9444-1/
Ответственная компания которая ценит долгосрочное сотрудничество всегда идут навстречу клиенту. https://xn--80aeedb0bfzeok.xn--p1ai/catalog/magnievyi-krug/krug-magnievyi-250-mm-ma14-gost-18351-73/
В каталоге представлены конденсаторные ниобиевые порошки высокой чистоты необходимые для современной электроники. https://rms-ekb.ru/catalog/stalnoi-list/stalnoi-list-amg6-50x1000x1300-gost-19903-2006-gladkii-chernyi-goriachekatanyi/
Очень широкий каталог нашли всё необходимое в одном месте включая редкие позиции. https://xn--80aeedb0bfzeok.xn--p1ai/catalog/mednye-dvukhrastrubnye-mufty-pod-paiku/mednaiadvukhrastrubnaiamufta-pod-paiku106kh3-3mmm2gost-32590-2013/
Ассортимент компании включает более 100 000 позиций что позволяет закрыть практически любые потребности металлургического производства. https://rms-ekb.ru/catalog/krug-iz-instrumentalnoi-stali/krug-85kh6nft-82-gost-5950-2000/
Долго искали надежного поставщика циркония в Редметсплав предложили лучшие условия и чистоту металла. https://xn--80aeedb0bfzeok.xn--p1ai/catalog/latunnaia-kapilliarnaia-trubka/latunnaia-kapilliarnaia-trubka-1-3kh0-35kh10000-mm-l70-gost-2624-2016/
Реализация твердых сплавов типа «Победит» ориентирована на производителей металлорежущего и бурового инструмента. https://rms-ekb.ru/catalog/stalnoi-list/stalnoi-list-10khsnd-2-2x1000x1300-gost-19903-2006-gladkii-chernyi-goriachekatanyi/
Редметсплав — надежный партнер работаем по поставкам нержавеющего проката уже второй год сбоев не было. https://xn--80aeedb0bfzeok.xn--p1ai/catalog/mednye-dvukhrastrubnye-mufty-pod-paiku/mednaiadvukhrastrubnaia-podvizhnaiamufta-pod-paiku34kh1mmm2mgost-32590-2013/
Компания обеспечивает поставки оксовольфрамата гафния — редкого соединения для специфических нужд химической и атомной промышленности. https://rms-ekb.ru/catalog/truba-konstruktsionnaia/truba-konstruktsionnaia-12kh18n10t-114×6-5-gost-21729-76/
Поставки всегда вовремя логистика отлажена до мелочей что важно для бесперебойной работы цеха. https://xn--80aeedb0bfzeok.xn--p1ai/catalog/latunnye-naruzhnye-stopornye-koltsa-po-gost/latunoe-naruzhnoe-stopornoe-pruzhinnoe-koltso-40kh1-7-mm-lts40mts3zh-gost-13942-86/
В каталоге представлены конденсаторные ниобиевые порошки высокой чистоты необходимые для современной электроники. https://rms-ekb.ru/catalog/ugolok-stalnoi/ugolok-stalnoi-st20-40x30x4-gost-19771-93/
Индивидуальный подход к нестандартным заказам — изготовили детали по нашим чертежам точно в размер. https://xn--80aeedb0bfzeok.xn--p1ai/catalog/mednye-dvukhrastrubnye-mufty-pod-paiku/mednaiadvukhrastrubnaia-podvizhnaiamufta-pod-paiku53-6kh1-2mmm3tgost-r-52922-2008/
Металлические порошки различных фракций позволяют клиентам использовать их в порошковой металлургии и напылении. https://rms-ekb.ru/catalog/plity/plita-7khg2vmf-23x80x1000-gost-19903-74/
Прозрачное оформление документов и быстрое выставление счетов приятно работать с профессионалами. https://xn--80aeedb0bfzeok.xn--p1ai/catalog/latunnye-naruzhnye-stopornye-koltsa-po-gost/latunoe-naruzhnoe-stopornoe-pruzhinnoe-koltso-46kh1-7-mm-lts40mts3a-gost-13942-86/
Опыт работы с более чем 120 постоянными заказчиками свидетельствует о высокой стабильности и надежности поставок. https://rms-ekb.ru/catalog/ugolok-stalnoi/ugolok-iz-konstruktsionnoi-stali-150kh100kh10-mm-c45-din-59370/