Chapter 7. The conversation: Seam’s unit of work
This chapter covers
Seam helps establish a rich user experience by stretching the boundaries of a unit of work to cover a use case—a determinate interchange between the user and the application. In this chapter, you’ll learn how Seam’s conversation context can host the working set of data needed to support this interchange. Seam’s conversation is contrasted with traditional state management techniques, demonstrating how it both relieves the burden of handling this task and gives multipage interactions a formal representation in a web application. Conversations open the door to more advanced state management techniques—such as stateful page flows, nested conversations, and workspaces—that further enrich the user experience.
Conversations are one of Seam’s crowning features, touching many areas of the framework and bridging earlier chapters with those that lie ahead. In fact, CRUD applications created by seam-gen use conversations to manage the use case of adding and modifying an entity instance. To witness conversations in action before beginning this chapter, you can study them at work in the Open 18 application. This chapter starts off by defining a use case and then explores how aligning it with a stateful context can improve the user’s experience.