title: Are utility classes evil?
body: <p>I saw this question: <em><a href="https://stackoverflow.com/questions/3339929/if-a-utilities-class-is-evil-where-do-i-put-my-generic-code">If a &quot;Utilities&quot; class is evil, where do I put my generic code?</a></em></p>
  <p>And I thought, why are utility classes evil?</p>
  <p>Let’s say I have a domain model that is dozens of classes deep.  I need to be able to xml-ify instances.  Do I make a toXml method on the parent?  Do I make a MyDomainXmlUtility.toXml helper class?  This is a case where the business need spans the entire domain model -- does it really belong as an instance method?  What about if there are a bunch of auxiliary methods on the XML functionality of the application?</p>