C
Chris Marsh
All
Good day to everyone!
I am developing a system which interfaces with various external systems. The
set of external systems will change and grow over time. I will produce a new
class to represent each of these external systems, and each of these
classes will implement an interface that I have designed (IExternalAccount).
What I want to do is ensure that a) I need to make minimal code changes in
order to introduce a new implementation of the interface IExternalAccount to
the system, and b) I can control which external systems are included in my
system via my config file.
The approach that I'm taking is to have an entry in the config file, the
value for which is a comma delimited list of class names. I access this
value from my code, then create an object instance of each of the classes
listed. These are then added to a collection, and then processed.
My questions are:
1. Is this a good approach?
2. Can someone suggest how to implement this design (or point me in the
right direction)?
Many thanks in advance for your assistance!
Good day to everyone!
I am developing a system which interfaces with various external systems. The
set of external systems will change and grow over time. I will produce a new
class to represent each of these external systems, and each of these
classes will implement an interface that I have designed (IExternalAccount).
What I want to do is ensure that a) I need to make minimal code changes in
order to introduce a new implementation of the interface IExternalAccount to
the system, and b) I can control which external systems are included in my
system via my config file.
The approach that I'm taking is to have an entry in the config file, the
value for which is a comma delimited list of class names. I access this
value from my code, then create an object instance of each of the classes
listed. These are then added to a collection, and then processed.
My questions are:
1. Is this a good approach?
2. Can someone suggest how to implement this design (or point me in the
right direction)?
Many thanks in advance for your assistance!