Search code examples
language-agnosticdefensive-programmingrobustnessexternal-dependencies

How do you manage external dependencies for your application?


There are many types of external dependencies. Interfacing with external applications, components or services (e.g. Outlook to send emails, TWAIN or WIA for scanning, ActiveX objects and Web services for various purposes, and so on).

What is your strategy for making sure that your application is robust, and can run even when such external dependencies (for innumerable reasons) are unavailable?

Note: Code from external sources included in your own source code is another type of external dependency, but that is not mainly what I am concerned about here.


Solution

  • Our strategy, is that our software may not except in exceptional circumstances. So we program quite defensively:

    • If there is no mail connection, the mail functionality is not available.
    • Graphic output depends on available graphics card.
    • Only the availability of a network enables the distributed functionality.

    And there are more.