Book Image

Learning Dart, Second Edition - Second Edition

By : Ivo Balbaert
Book Image

Learning Dart, Second Edition - Second Edition

By: Ivo Balbaert

Overview of this book

Table of Contents (18 chapters)
Learning Dart Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Defining and using the MVC pattern


Conceptually, there are several basic modules in almost any software. The model is a data container and the user interface (UI) is a way to communicate with the model. A relationship between the model and the UI is bidirectional. Data from the model is displayed to a user and a user may change the model's data. The model may keep some or all of the data in the main memory and store the data in an external storage, such as files or databases (db). A relationship between the model and the data storage is also bidirectional. The UI has one or many views of data, which present data in a format useful to users, and one or many controllers, which channel changes in the data to the model. For example, a web application, after a user request, retrieves data from a database and displays it in a presentable way. After the user changes the data, the application updates the database. There is a flow of data between the UI and the db. For a simple data model and...