I think It's not the better way IMHO, check it please http://www.oodesign.com/factory-pattern.html