Summary
In this chapter, we discussed how we can present data to the user from an object model perspective. We have seen how an unstructured approach leads to some problems in extensibility and maintainability of the code. The presentation patterns can help us better organize our code in order to design a flexible and clear architecture. The most known presentation patterns discussed in this chapter define three components that work together to achieve this goal.
We started by exploring the Mode-View-Controller pattern, whose components have a clear role and cooperate to manage the interactions between the user and the underlying data model. Then, we illustrated the Model-View-Presenter pattern, a pattern derived from MVC whose main difference is the introduction of a layered system. In fact, this pattern prevents a View to directly access the Model. This access is always mediated by the Presenter. Finally, we analyzed the View-Model-ModelView pattern, which maintains the layered approach...