Chapter 11: Understanding the Operation Result Design Pattern
In this chapter, we explore the Operation Result pattern starting from simple to more complex cases. An operation result aims at communicating the success or the failure of an operation to its caller. It also allows that operation to return both a value and one or more messages to the caller.
Imagine any system in which you want to display user-friendly error messages, achieve some small speed gain, or even handle failure easily and explicitly. The Operation Result design pattern can help you achieve these goals. One way to use it is as the result of a remote operation, such as after querying a remote web service.
The following topics will be covered in this chapter:
- The Operation Result design pattern basics
- The Operation Result design pattern returning a value
- The Operation Result design pattern returning error messages
- The Operation Result design pattern returning messages with severity levels...