Tuan-Anh Tran

What goes into what in MVC

Posted on November 13, 2013  •  1 minutes  • 82 words

Explain MVC like I’m 5.

View: “Hey, controller, the user just told me he wants item 4 deleted.”

Controller: “Hmm, having checked his credentials, he is allowed to do that… Hey, model, I want you to get item 4 and do whatever you do to delete it.”

Model: “Item 4… got it. It’s deleted. Back to you, Controller.”

Controller: “Here, I’ll collect the new set of data. Back to you, view.”

View: “Cool, I’ll show the new set to the user now.”

Follow me

Here's where I hang out in social media