JavaScript error handling and General Best Practices

A very interesting presentation from Nicholas C. Zakas named “Enterprise JavaScript Error Handling (Ajax Experience 2008)”, worth to read.

I am collecting application development best practices for quite a long time, and after studying slides from this brilliant presentation my “Error Handling” part increased. Some day I will publish a full list, but now just “Error Handling” part as a very short summary of presentation.

  • Assume your code will fail.
  • Log errors.
  • Provide a debug mode.
  • Don’t tell the user application is not working unless absolutely necessary.
  • Recovery from error if it is possible if not than message the user immediately.

One Response

  1. [...] links? You might enjoy this article on Avoiding Bugs from InformIT and also this slide about JavaScript error handling Add your comments Be nice! Spam and irrelevant comments will be deleted. Name [...]

Leave a Reply