I am working on application, details of which I cannot discuss here. We have core framework and the rest is designed as plug in. In the core framework we have a domain object. This domain object is updated by the plugins. I have defined an interface in which I have function as
DomainObject doProcessing(DomainObject object)
My intention here is I pass the domain object, the plug in will update it and return it. This updated object is then passed again to different plugin to be updated.
I am not sure if this is a good approach. I don't like passing the DomainObject to plugin. Is there a better way I can achieve this? Should I just request data from plugin and update the domain object myself?