3 ms·
Me. I really struggled with it early on when I was moving from single file php to frameworks, so I read head first design patterns. There MVC made sense; you ha
by HeyImAlex 14y ago
Me. I really struggled with it early on when I was moving from single file php to frameworks, so I read head first design patterns. There MVC made sense; you had state to maintain, and changes to make; MVC still holds up well in desktop GUI applications. But on the web you throw away the world on every request, so essentially you're just running a big API where every request gets interpreted by the controller, acted on by the model and rerendered by the view; basic separation of concerns. All of these "model pushes changes to the view, controller accepts actions" stuff from the original MVC seems like it's really poorly mapped to the web. I still don't know if it just hasn't clicked yet or I'm doing it all wrong or something, but I really wish I could have a bit more certainty when I'm architecting new projects that I'm doing MVC "right".