04-05-2008, 07:57 PM
|
#25 (permalink)
|
|
The Visitor
Join Date: Apr 2008
Posts: 3
Thanks: 0
|
Hello guys,
this is my first post and I'm not an native english speaker so i will try to do my best.
I'm not seeing the right purposes of using factory pattern. You are trying to hide the specific type of the object when instantiating it. But you have to specify which type of database you want to use.
You made something like this :
$factory->connect('mysql);
so, now imagine that you are connecting with this method in 100 different pages. and now you want to change from mysql to oracle.
You need to open all the 100 files and change the $factory->connect('mysql') to $factory->connect('oracle') :s
or am i wrong ?
|
|
|
|