Operation Result Pattern
This chapter explores the Operation Result pattern, starting simple and progressing to more complex cases. An operation result aims to communicate the success or 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.
This pattern builds upon foundational object-oriented programming concepts. In this chapter, we iterate and design different forms of operation result objects incrementally. Of course, you should always base your final design on your needs, so learning multiple ways to implement this pattern will help you make the right choices.
The Operation Result pattern is also known as the Result Object pattern. I prefer Operation Result because the name specifies that it represents the result of an operation, while Result Object has a broader meaning. Nonetheless, both are basically the same.
In this chapter, we cover how to implement the Operation Result...