F
friendhouston
Hi,
Have a requirement where new items may be added later to an existing
list of items. These new items may have new features but will need to
contain minimum basic features like description and price. These items
should be added to the existing code without the code being needed to
be recompiled or making minimum changes to the existing code i.e. it
should be OCP compliant. Not sure how to go about this . The only
things which come to my mind are that each new item class should derive
from an IItem interface and that each new class could be placed in a
seperate assembly. Is there some way to use reflection or any other
feature to accomplish this ?
thanks in advance.
Have a requirement where new items may be added later to an existing
list of items. These new items may have new features but will need to
contain minimum basic features like description and price. These items
should be added to the existing code without the code being needed to
be recompiled or making minimum changes to the existing code i.e. it
should be OCP compliant. Not sure how to go about this . The only
things which come to my mind are that each new item class should derive
from an IItem interface and that each new class could be placed in a
seperate assembly. Is there some way to use reflection or any other
feature to accomplish this ?
thanks in advance.