The ideal pattern  70   95.9 Apr 26, 2010 In a software that I'm
developing, I've a problem, I'm searching a solution for that,
and I think that a solution can come from a design pattern, so
I'm here for some suggestions. The software must connect to a
server, the server can be of a different type (for example FTP
and SQL), after the connection the software must perform some
actions, for example download a list of something. We have
different type of server, so if the software is connected on a
FTP server, the action is download a list of files, if the
software is connected on a SQL server the action is a query on a
table. When the software starts, it loads a configuration file,
on this file there are some server informations, what happen in
reality is a population of a list of ServerInfo objects, each
object contains the server type, the address and the login data.
I'm searching an elegant and transparent solution, I don't want
code like this: Server server;   if (serverInfo.type == FTP)
server = new FT