The ConnectionManager class is an example of providing abstraction to database connectivity using the factory design pattern.
The factory method in the ConnectionManagerFactory class returns the correct ConnectionManager object according to the chosen database type, i.e MySQL or MSSQL.
To add support to other databases one can extend the ConnectionManager class. |