Brief example of how to use the MVC pattern with Require.js
This is basically just a simple counter that
- adds by 1
- subtracts by 1
- mutiplies by 2
- does integer division
The point was to abstract the SPA as much as possible into 4 tiny modules, appropriately named modelThis, viewThat and controllerOther. Each module having their respective role.