Default vs Impl when implementing interfaces in Java

Posted by Gary Rowe on Programmers See other posts from Programmers or by Gary Rowe
Published on 2011-05-12T20:09:26Z Indexed on 2013/11/13 16:16 UTC
Read the original article Hit count: 840

Filed under:
|

After reading Should package names be singular or plural? it occurred to me that I've never seen a proper debate covering one of my pet peeves: naming implementations of interfaces.

Let's assume that you have a interface Order that is intended to be implemented in a variety of ways but there is only the initial implementation when the project is first created. Do you go for DefaultOrder or OrderImpl or some other variant to avoid the false dichotomy? And what do you do when more implementations come along?

And most important... why?

© Programmers or respective owner

Related posts about naming

Related posts about interfaces