News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPClasses.org:
8 defensive programming best practices to prevent breaking your sites
April 26, 2007 @ 11:11:00

As anyone who's been developing applications (web or otherwise) knows, there are certain things that you just don't do when you're doing things like adding features or changing the code of a production application. There are some general rules to follow and this new article on the PHPClasses.org website reminds us of just a few.

This article describes software development practices that have been used to prevent problems that can break Web sites.

Included in his list are things like:

  • Handle unexpected conditions Test your code
  • Monitor your site errors and act upon them
  • Do not disclose errors to the users
  • Do what you can as you can never get defensive enough
He also recommends two resources for some additional reading - the Wikipedia entry for "defensive programming" and a chapter from Getting Real (from 37 Signals) about how to "Get Defensive".

0 comments voice your opinion now!
defensive bestpractices break site defensive bestpractices break site


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: The ZendCon Sessions Episode 2: Best Practices for Sending Mail from PHP

Joshua Thijssen: Introducing the REST cookbook

AirPair.com: Best Practices for Modern PHP Development

Joshua Eichorn's Blog: Understanding AJAX example code now available

Matthias Noback: Unnecessary contrapositions in the new "Symfony Best Practices"


Community Events

Don't see your event here?
Let us know!


interview extension release community laravel list introduction series example laravel5 opinion version library framework wordpress language podcast php7 voicesoftheelephpant api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework