Good day to all. All from the first of April. )

As a .net developer, it is more pleasant for me to write the IDemoView interface - the implementation of DemoView, but often, as I see it, in projects they do this: the DemoView interface - the implementation of DemoViewImpl. How to do it right? Just doing the first project in Java.

Thank you in advance.

    2 answers 2

    In Java, the variant with DemoView - DemoViewImpl is adopted, although, in general, the name of the implementation should reflect a little more than just what, they say, look, friend, I am the implementation!

    Look at the standard collection library, (Set -> HashSet, TreeSet) the name of the implementation carries the information on what basis (technology, method) this interface is implemented.

    • thank. well and why here a man still came to IMailView habrahabr.ru/post/113121 - AndereyMaybe
    • 2
      Ask this person why he decided to do this. Nobody forbids you to name your interfaces this way, but have you seen at least one such naming in the standard library? - system29a
    • No, I clearly thank you. - AndereyMaybe

    -Impl is also very bad. Allowed if the interface has a single implementation. Standard convention: View -> DemoView. It should be used in 99.9% of cases.