Defensive Design Considerations (OCR GCSE Computer Science)
Revision Note
Written by: James Woodhouse
Reviewed by: Lucy Kirkham
What is defensive design?
Defensive design is an approach to software development where every possible input from a user is considered
This is done to anticipate all of the ways a user could misuse a program
Defensive design ensures that the final program is robust and reliable for all users
Occasionally, some errors can occur in software that can not be foreseen by the developer when writing the software
Defensive Design Considerations
How can a software developer anticipate errors in programs?
Many errors can occur in a program and some of these can be difficult to anticipate when initially developing the software
The programmer must ensure the software has a way of dealing with the potential errors to ensure their software does not crash
Some examples of these errors include
Peripheral errors
Disk errors
Communication errors
In these instances, a programmer must ensure their software deals with these errors to ensure it is robust and reliable for its users
Peripheral errors
Peripherals commonly don't perform as intended, such as printers and this can cause an issue for the end user
If a printer runs out of paper, runs out of ink or has a paper jam; the user should have the option of reprinting their document
These considerations must be pre-planned in the software
Disk errors
Programs such as word processing software must be able to account for errors on a disk drive
Example errors that may occur on a disk include
Disk running out of space
Files and folders not being found
Corrupted files
These issues must be preplanned in the software the user has an alternative option, for example, saving their work on another disk
Communication errors
Applications which use online systems must be connected to a host server
When a connection is lost, the program should provide a way for the user to cancel their request and try again
The program may also be able to automatically retry if the connection resumes
Authentication
What is Authentication?
Authentication is the process of ensuring that a system is secure by asking the user to complete tasks to prove they are an authorised user of the system
Authentication is done because bots can submit data in online forms
Authentication can be done in several ways, these include
Usernames and Passwords
CAPTCHA
Other methods that programmers can do to authenticate the user is include
Allowing users to recover passwords via email links and SMS codes
Encrypting data
Last updated:
You've read 0 of your 5 free revision notes this week
Sign up now. It’s free!
Did this page help you?