Hi,
<br>
<br>I apologize in advance if this subject is out of scope of this list but I would appreciate if you help me with your expertise in building evolving systems. It happens I have an object that need to operate in different cenarios. For each one the method parameter and signature of the method varies. For example:
<br>
<br>I have a component Manager that calls the component Performer through its facet. The facet of the Performer component implements the PerformerFacet that has the method perform_action(). PerformerFacet inherits from PerformerFacetBase (without methods) that is what the receptacle of the Manager component uses.
<br>
<br>It happens that the parameter of the perform_action method should vary depending on the Performer that is connected. For example: In one cenario I need to invoke perform_action (string action_name).In another cenario I need to invoke perform_action (ActionObject act_obj).
<br>
<br>I don't know in advance the parameters accepted by all the Performers that could connect to the system.
<br>
<br>Is there a way that I can make the Performer component change (including the signature of its facet methods) and don't have to change the code I already have in the Manager component?
<br>
<br>I searched some patterns and could not find one that fits this situation. I'm wondering if what I want to do is really possible. In summary: Is it possible change the method signature of one object without having to change the code of his clients?
<br>
<br>Thank you very much.
<br>
<br>Santos
<br>
<br><br/>
<div>
<hr style="width:85%;margin-left:0px;text-align:left"/><br/>
<b>Want to change your life? Find the perfect job with Lycos Jobs.</b><br/>
Career Advice. Job Resources & Recommendations.<br/>
<a href="http://www.careerbuilder.com/?lr=cblycos&siteid=lycoshp7"
target="_blank"><u>Post your resume & find a job match!</u></a>
</div>