title: How should I structure a Java application, where do I put my classes?
body: <p>First of all, I know how to build a Java application. But I have always been puzzled about where to put my classes. There are proponents for organizing the packages in a strictly domain oriented fashion, others separate by tier.</p>
  
  <p>I myself have always had problems with </p>
  
  <ul>
  <li>naming, </li>
  <li>placing</li>
  </ul>
  
  <p>So,</p>
  
  <ol>
  <li>Where do you put your domain specific constants (and what is the best name for such a class)?</li>
  <li>Where do you put classes for stuff which is both infrastructural and domain specific (for instance I have a FileStorageStrategy class, which stores the files either in the database, or alternatively in database)?</li>
  <li>Where to put Exceptions?</li>
  <li>Are there any standards to which I can refer?</li>
  </ol>