-1

While working on implementing design patterns in the project, is it enough to name packages as design pattern type like:

*dao
*delegate
*facade
*coordinator
*handler
*util

Or one need to specify those in the source code file explicitly as:

*DAO.java
*Delegate.java
*Facade.java
*Coordinator.java
*Handler.java
*Util.java

Also found some naming conventions where I*. Java (prefix with the letter 'I') use for the interface, E*.java for an enum, or adding *Impl.java to indicate an implementation class?

amit
  • 175,853
  • 27
  • 231
  • 333
Sagar
  • 125
  • 1
  • 15

2 Answers2

-1

Yes it is mandated as per standards to name the files as like you mentioned above for better readability by the users. Instead of always referring the package, the file names could help to get the better vision.

-1

In addition to the other answer, which I agree (Add the Pattern name to the class name). I don't think it's a good practice, in general, to package based on the pattern, but rather on the functionality.

E.g. http://www.javapractices.com/topic/TopicAction.do?Id=205 these are very old guideliness but I think they are still valid.

Pau
  • 803
  • 1
  • 6
  • 12