Index
Overview
Mockup of View
Model (Counter)
User Interface (UI)
Complete Source Code
Overview
This is a minimal example that demonstrates input fields, output fields and action buttons.
Model:
Counter
input:
count
output:
count, log
actions:
increment, decrement
Mockup of View
View
Quick mockup of view
Model (Counter)
We'll work in this order: M-V-C.
Model Code
The model source code is listed here...
The public methods are shown here. We will use these in the unit test and also the
ui
.
getters: getCount getLog setters: setCount actions: increment decrement
📋
Test Case
The test case code is listed here...
We should code the test case in parallel with the model.
User Interface (UI)
Once we have the model green (tests passing) we move to the UI:
Coding the view
Coding the controller
Complete Source Code
The source code for the example
is here...
JavaScript Guide (Chapter 305 - FirstMVCApps)
Chapter 305 - FirstMVCApps
Counter MVC Example
Challenge
Search Site
Home
Back To Top