deutsch

Software interface to external systems – eliminating a major failure source

During the last days I spend a lot of time thinking about how to write stable software code and realized that one major source of failure are interfaces to external sources.

Interfaces, the way I mean are pretty simple to understand and are exclusively relevant within your application. For example, if you create a method of a class – where you just write a log message to your log file – at this point you access and create an interface towards an external system – in this case the file system.

Every method has two native interfaces: the Input and the return value – the first is inserted in the method and latter will be returned by the method. But if you access external sources like

  • » Database
  • » File System
  • » WebServices
  • » Global Variables
  • » eMail
  • » Command Line calls
  • » External Libraries
  • » Server Services (LDAP, etc.)

you create new interfaces, and If you do not validate the data inserted in your function by this interface, your application will sooner or later fail.

Therefore, to eliminate the failure likelihood initiated by a software communication with external interfaces, always validate the data returned by the interface and keep the number of interfaces as low as possible ( e.g. create a single class/function for accessing the interface which you can reuse).

This entry was posted on Wednesday, September 5th, 2007 at 5:42 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply