A UI Design Pattern Love Song

Much has been written about the MVC but never, I believe, a love song … so here you go: a love song to the Model-View-Controller. 

This small experiment in erotic didacticism is sung to Some Enchanted Evening from Rogers and Hammerstein’s South Pacific.  I have embedded a video of Ezio Pinza and Mary Martin singing the original in case you need some help with the tune.

Some enchanted evening
You may see a pattern,
you may see a pattern
Across a crowded room
And somehow you know,
You know even then
That somewhere you’ll see it
Again and again.

Model-View-Controller
Someone may be coding
You may hear him coding
Across a crowded room
And night after night,
As strange as it seems
The shape of that pattern
Will drift through your dreams.

Who can explain it?
Who can tell you why?
Fools give you reasons,
Wise men never try.

Model-View-Controller
First it has a model,
Yes it has a model
To represent your store,
It’s your data store
Your persistence layer
Where all of your data
Is written and saved.

Model-View-Controller
Has a presentation,
And that presentation
Of state is called a View.
A view of your store
On your GUI layer
It’s bound to your model
And registers change.

Model-View-Controller
Third has a controller
That facilitates
Changes to model state
On your model layer
In response to acts
That come from your user
With keyboard or mouse.

Once you understand it,
Never let it go.
Once you understand it,
Never let it go!