kickthemooon
3 years ago
1092
3
Tips

Factory method pattern DB object instantiation?

Posted 3 years ago by kickthemooon

I am trying to grasp the factory design pattern in PHP. It is very hard doing so with the usual automobile, animal, etc. examples.

I would like to try and grasp it through a real life problem of concrete database object instantiation.

So my first question would be: How would a UML diagram for this problem look like? What would be the necessary classes / interfaces ?

class Database class DatabaseFactory class Mysql class Postgresql ?

Any help / suggestion / reference is welcome.

Please sign in or create an account to participate in this conversation.