Model-View-Controller Paradigm

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

The Model-View-Controller Paradigm is a useful way to see the internals of an application.

The Model are the elements that comprise the data that drives the app.

The View are the elements that draw stuff on the screen.

The Controller bits take user interactions and change the model and view.

This has gone through various stages of change in my mind. Today, I think of MVC as a convenient way to take data in one format and present it in another. You abstract out the data from its representation. The controller is there to translate events just as the M-V bits translate data.

More importantly, often times the model classes are representations of distant things.

I should write more on this because I see some serious power here and I don't think it is what most people see. For instance, they only see it as useful for GUIs, while I use this paradigm to write purely backend services or even data summation scripts.