13
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 ...
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