Use of Third Party Applications/Code in yours

Quite often you need to use a third party application in your code.  This may be a workflow tool, a reporting service.

If you need to integrate with it  (you need to call it or it needs to call you) keep these to a small well defined interface.

Build a simple assembly for calling it an use that for all access.  For it to call you produce a second small assembly.

Do not let any of it’s implementation details leak beyond that.  Those should be the only assemblies that have a reference to the third party code.

Careful use of this can allow you to replace a product (possibly with some custom code) at a later time with minimal effort.

Leave a comment