Best Practice: String converting batch in instantiating class or capsulated in every instantiated class
<p>One class <code>Customers</code> instantiates many other classes (e.g. <code>CustomersFromMysql</code>, <code>CustomersFromPostgeSQL</code>) that all query databases which give back customer names. Now these customer names come back as for example <code>name = "John Doe"</code>, what my <code>Customers</code> class needs though is more than <code>name</code>, it also needs <code>nameNoSpace = "JohnDoe"</code> and <code>nameInvertedComma = "Doe, John"</code> for example.</p>

<p>I would programm a helper class <code>Converter</code> which has methods like <code>invertName(name)</code> and <code>removeComma(name)</code>. Would I instantiate the converter in every class that queries the database (<code>CustomersFromMysql</code>, <code>CustomersFromPostgeSQL</code>) to give back all required variables or would I instantiate the <code>Converter</code> in the instantiating class <code>Customers</code> so when I get back results I iterate through my list and batch convert them?</p>

<p>Of course both works, but what is the way to go?</p>
