Possible Duplicate:
What is your threshold to use factory instead of a constructor to create an object?
What is the advantage to have all my classes instantiated only through the Factory DP?
As far as know a Factory is good when you have to choose from a list of similar objects to perform some task,let’s say like translations classes (english-> franch, arab->hebrew …) But when you have really one possible option, no reason to obscure/abstract the logic with a Factory method.
Any insights?
How do you know, that there won’t be other possibilities in the future? One of the most often reasons to change implementation of dependency is for unit tests. Do you really want all dependencies to use their real implementations when you are writing unit tests for it? Perfectly when writing a class you would declare what it needs to get its work done as arguments in the constructor, without caring where the implementations come from.
Using factories is one option to do this, better is to use a Dependency Injection container. There are quite few open source containers – pick one that suits your needs.