mvc.ts

This project includes two working demonstrations of the MVC pattern. A short description of each follows with a link to their respective demos and source code.

Version 1

View demo

In version 1, the Controller coordinates all activity and communication between components. When users interact with the app, the View triggers the Controller to take action - namely, updating the Model, saving data to the database and messaging the View to update the app's interface.

View Source

Version 2

View demo

In version 2, the View updates the Model directly. When the Model changes, it triggers the Controller to save data and message the view to refresh the app's interface.

View Source