Design – Build – Run: Applied Practices and Principles for Production-Ready Software Development
by Dave Ingram
19.4. Summary
This chapter discussed some simple but effective exception-handling guidelines and resilience patterns that can be used to offer more robustness in the application and overall solution.
The following are the key points to take away from this chapter:
Manage configuration changes appropriately. Ensure that configuration values are fully documented, especially when they relate to other values and settings, such as throttles.
Understand the browser behavior. You should fully understand the browser's navigation controls and what happens "behind the scenes", especially during postback and other browser functions such as forward, back and refresh.
Validate user inputs and encode them. You should always validate user input and where necessary encode the values to avoid malicious attacks.
Protect the system against URL hacking. The application should not allow users to perform actions that they are not authorized to do.
Consider implementing a token-synchronization pattern. The token synchronization pattern helps to ensure that all operations and transactions return to a "known state."
Don't leave exception handling to the last minute. Have an exception handling strategy up front.
Handle exceptions where you can. You need to consider all the exceptions that could occur in a method and handle each of them appropriately.
Add value where you can't actually handle an exception. It is important for incident investigation that you record as much information about the exception and the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access