The danger here is dependence, and not simply use or consumption. To be clear, there are a multitude of circumstances where it is better to leverage a piece of software than to roll your own. This holds true even if the software is not free! I experienced the cost of rolling my own first hand, and it is far from insignificant.

To prevent headaches later, avoid coupling your solution to the third party software. I made a significant mistake in this regard. I depended upon a complete path to Adobe Reader™. This dependency came in the form of a path that was hard coded in an exe.config file. Below is that used the path from the exe.config file before it was decoupled.

This is the code that specifically named the path to Adobe Reader.

Before the dependency on the third party executable’s path was corrected.

This became a very time consuming problem when the file path changed with the third party software’s major version.
For example: from Program Files\Adobe Reader\9.0\ to Program Files\Adobe Reader\10.0\. This is part of the loss of control that occurs with third party software, which is not a bad thing. However when bad choices are made (e.g. coupling yourself with a third party program’s specific path), you will feel the pain. My pain came in the form of customers not being able to print, which is a significant part of the value our solution provides.

The decoupled solution that I chose was to use the Windows file association as opposed to the executable path.

ReportHandler.RunProcess(filename, ProcessWindowStyle.Hidden, LocalConstants.PrintToVerb, printerName);

Upon decoupling my software from Adobe Reader™ (more specifically their install directory), I was content to allow Adobe Reader’s major releases to change their install directory. This way I let Adobe handle updating, changing, enhancing, or otherwise maintaining their pdf viewer. As a bonus, the application now works with other non-Adobe pdf viewers. This freed up my time to focus on my customers needs and wants.

There will always be some point of integration between any two pieces of software. The goal is to establish an interface that will position both parties (or at least your software) for a brighter and less coupled future.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s