DEV Community

Discussion on: Explain MVC like I'm five

Collapse
 
funkybob profile image
Curtis Maloney

MVC lets you cleanly think about writing GUI programs.

It has a "Model" of your data, which emits events when its content changes.

It has a "View" of the data, to show it to users. This listens to the change events to know when to update. This, in turn, emits events when the user interacts with it.

Finally, it has a Controller, which reacts to events from the View, and does "the work", typically updating the Model.

It's a nice, clean, circular pattern... everything always goes forwards (M -> V -> C -> M -> ).