« phpMyAdmin 2.10.1 Security Release | Main | Online Regular Expression Library »

8 Defensive Programming Best Practices To Prevent Breaking Your Sites

Manuel Lemos posted a very interesting article on defensive programming techniques. Things goes when PHPClasses newsletter faced some technical problems in delivery, but thanks to defensive programming "no harm was done. It only caused a delay in the delivery of the newsletters that were left in the queue for several days". An interesting experience I can say because there are unexpected things that might happen to your site, and using some best practice programming techniques you can prevent the worst from happening. Manuel recommends to :

  1. Handle unexpected conditions
  2. Process external systems data properly
  3. Test your code
  4. Monitor your site errors and act upon them
  5. Do not disclose errors to the users
  6. Damage control
  7. Backup
  8. Do what you can as you can never get defensive enough
Bookmark this article at these sites
Post a comment





(Email will remain hidden)





Please enter the security code you see here




Related entries
Email to a friend
Email this article to:


Your email address:


Message (optional):