Defensive design 1

  • Created by: Tomiwaq
  • Created on: 11-05-19 20:23
View mindmap
  • Defensive design
    • Programs functioning properly
      • When programs are functioning properly they should never break
      • Even big companies need to update and patch their programs regularly
      • Programmers try to protect their programs through defensive design
        • Anticipate how users may misuse their program, then prevent it from happening
        • Ensure their code is well maintained
        • Reduce the number of errors in the code through testing
    • Making sure inputs can't be exploited
      • The easiest way for misuse of a program is through entering data wrong
      • Two ways to prevent users from entering something you don't want them to
        • Input sanitisation
          • Removing unwanted characters before passing data through the character
        • Input validation
          • Checking if data meets the certain criteria before passing it into the program
      • There are 6 different checks
        • Range check
          • Checks the data is within a specified range
        • Presence check
          • Checks the data has actually been entered
        • Check digit
          • Checks numerical data has been entered correctly
        • Format check
          • Checks the data has the correct format
        • Look-up table
          • Checks the data against a table of acceptable values
        • Length check
          • Checks the data is the correct length

Comments

No comments have yet been made

Similar Computing resources:

See all Computing resources »See all Design, testing and IDEs resources »