Switch interface implementation using configuration
- by Marcos
We want to allow the same core service to be either fully implemented or, as other option, to be a proxy toward a client legacy system (via a WSDL for example).
In that way, we have both implementation (proxy & full) and we switch which one to use in the configuration of the app.
So in a nutshell, Some desired features:
Two different implementation (proxy, full) instead of one implementation with a switch inside
Switch implementation using configuration: dependency injection? reflection?
Nice-to-have: the packaged delivered to the client doesn’t have to change depending on the choice between proxy or full
Nice-to-have: Client can develop their custom implementation of the Core Interface and configure the applciation to use that one
With this background, the question is: What alternatives we have to choose one implementation or other of an interface just changing configuration?
Thanks