DEV Community

Discussion on: Explain MVC like I'm five

Collapse
 
yechielk profile image
Yechiel Kalmenson

I wrote a blog post to explain it using a great analogy: Welcome To The MVC Restaurant

Collapse
 
sparkcruz profile image
Roger Cruz

Nice, but I'd like to point out your food is the Model, the workers are Services. Having a model know how to communicate to the database is like having a chips package to sell itself, open itself, eat itself and then throw itself in the right garbage can. So either you have a Persistence Service or you Represent Data as it passes through your layers.
ActiveRecord is a lie.