Chapter 7. Presenting Data to the User
One of the most visible parts of an application is, for obvious reasons, the presentation of data to the user. Whether an application has a graphical interface or it provides a command line interface, the management of interaction between the user and the data managed by the application is always a critical aspect. Allowing the user to change data consistently and providing a feedback and/or a result often involves complex processing that can lead to code not always clear and difficult to maintain.
Some well-known patterns can help us design a structured code with many benefits in flexibility and maintainability. This chapter will focus on these patterns, known as presentation patterns, whose main goal is to separate presentation from data model. In particular, we will explore the three most known presentation patterns:
- Model-View-Controller pattern
- Model-View-Presenter pattern
- Model-View-ViewModel pattern