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

Get Mastering JavaScript Object-Oriented Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.