Java - Naming of interfaces and their implementations

Soldato
Joined
1 Mar 2003
Posts
5,508
Location
Cotham, Bristol
I've created a couple of services and dao classes named XXXService or XXXDAO, also packaged away in service and dao packages.

I'd like to extract an interface for the services and dao's but I'm wracking my brain on what to actually call them.

A bit of googling seems to suggest that it's common to think the following as bad practice

- Naming classes eg. SomethingDAO, just put said class in a dao package and omit the dao.
- Naming interfaces ISomething
- Naming interface implementations SomethingImpl

For example I have a service that is responsible for using a DAO to do CRUD operations on a List class so I've called it ListsService and ListsDAO. Now that I'm thinking about creating interfaces from these my first thought was ListsService, ListsServiceImpl and ListsDAO and ListDAOCouchbaseImpl.

Thoughts?
 
Back
Top Bottom