Hey everyone! I’m just starting out with web dev and I’m trying to wrap my head around MVC stuff. I’m using Django right now and I think it’s an MVC framework, but I’m not sure if I’ve got it right.
Is this how it works?
- Views = frontend
- Models = backend
- Controllers = the glue in between
If that’s true, what’s the deal with frontend frameworks like Backbone or Angular? How do they fit into the MVC picture?
Also, I’m thinking about making a simple blog. What framework would you guys recommend for that? And do some websites use both frontend and backend MVC frameworks together?
I’ve looked around online but I’m still kinda confused. Can anyone break it down for me? Thanks!
yo ZoeString42, mvc can be tricky. django’s actually more mvt (model-view-template). for a blog, maybe try flask? it’s lighter. frontend frameworks like angular are client-side mvcs, separate from backend. they handle ui logic. some sites use both, yeah. it gets complex fast tho!
MVC architecture is indeed complex, but your understanding is on the right track. In Django, the ‘view’ actually acts more like a controller, handling logic between models and templates. The template system in Django serves as the ‘view’ in traditional MVC.
Frontend frameworks like Angular or React can be seen as implementing their own MVC pattern on the client side, independent of the backend. They manage state and UI logic in the browser, often communicating with the server via APIs.
For a simple blog, Django is actually a solid choice. It’s robust and has a lot of built-in features that can be helpful for beginners. However, if you want something lighter, Flask could be a good alternative.
Regarding using both frontend and backend MVC frameworks together, it’s becoming increasingly common in modern web development, especially for complex applications. This approach is often referred to as a ‘decoupled’ or ‘headless’ architecture.
hey, im exploring mvc too. have you played with different frameworks? i found that trying things out can clear it up. why did you pick django? also, have you thought about static site generators for a simple blog?
what features would make your blog unique?