views:

157

answers:

2

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.

+3  A: 

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.

Gamecat
+1  A: 

Also note, that with external interfaces, much as with user input, you should not trust that input. Always validate input, and check for consistency (or existence) when calling.

Kris Kumler