Book Image

Learning Dart

Book Image

Learning Dart

Overview of this book

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

The TodoMVC app


We will now show how MVC functions in a Dart version of the famous TodoMVC application (http://todomvc.com/), which is used as a standard to compare different web frameworks. This application is developed in spirals in the dartling_todo_mvc project and it is built by using the Dartling framework for the model. Download the code from https://github.com/dzenanr/dartling_todo_mvc_spirals. In the following screenshot, you see a glimpse of the end result (Spiral 6):

The TodoMVC app

The todo items can be added, edited, marked as completed, and deleted; overviews of all tasks, or only the completed or remaining ones can be shown, and the user has undo/redo possibilities after making a mistake. Moreover, it is really useful because the data is stored in local storage (using the JSON format).

Spiral 0 – generating a class model

Spiral 0 does not have any UI; it contains only a simple model with one concept Task and two properties, title and completed. This is designed in Model Concepts...