Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 310
Ola Eldøy Avatar asked Oct 15 '22 17:10

Ola Eldøy


2 Answers

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.

like image 159
Toon Krijthe Avatar answered Oct 19 '22 01:10

Toon Krijthe


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.

like image 40
Kris Kumler Avatar answered Oct 19 '22 01:10

Kris Kumler