S
Shaun C Farrugia
I have a multi team solution being built where teams are segmented off
into seperate projects. One project is an over all framework containing
a Broker [worries about which db to access for data] class responsible
for instantiating different subclasses of type Connector [connects to
database - db specific] - the class only contains the abstract Connector
class and the Broker.
A seperate project contains the actual subclasses of the Connector that
are database specific. Another team will work exclusivley in that
project implementing these things.
Now the Broker class needs to be able to open the subclass dynamically.
Is there a CreateObject function that lets me pass an assembly name as
a string to some create method in order to instantiate the appropriate
object? And will I have a problem with this set up because project B
[Connector Implementations] will need to reference Project A [connector
abstract] and project A will need to know about the sub classes. Am i
missing a pattern here? The reason I need to instantiate via a string
name is so that project A doesn't need references to the subclasses.
This is my first OOP project so I might be missing something obvious.
into seperate projects. One project is an over all framework containing
a Broker [worries about which db to access for data] class responsible
for instantiating different subclasses of type Connector [connects to
database - db specific] - the class only contains the abstract Connector
class and the Broker.
A seperate project contains the actual subclasses of the Connector that
are database specific. Another team will work exclusivley in that
project implementing these things.
Now the Broker class needs to be able to open the subclass dynamically.
Is there a CreateObject function that lets me pass an assembly name as
a string to some create method in order to instantiate the appropriate
object? And will I have a problem with this set up because project B
[Connector Implementations] will need to reference Project A [connector
abstract] and project A will need to know about the sub classes. Am i
missing a pattern here? The reason I need to instantiate via a string
name is so that project A doesn't need references to the subclasses.
This is my first OOP project so I might be missing something obvious.