3 ms·
Roles are mixed in Django almost without exception. I blame this on the fact that you want to make changes to M, V, and C during a UI interaction while usually
by knappador 13y ago
Roles are mixed in Django almost without exception. I blame this on the fact that you want to make changes to M, V, and C during a UI interaction while usually only one URL gets called, and so the view updates the M, V, and C. It's like having a layer cake to keep things separate and then cutting it from the top into pie-slices. Sure it makes sense somewhat, but each slice now contains every layer. That is typical web programming.
Unless you're using class-based views or Meteor etc AND hybrid-style API's, things aren't even beginning to resemble application programming with a separate network aspect to the application. These days I'd just about rather print HTML/CSS onto paper so I can at least burn it. The whole web-standards movement never grasped me as egalitarian or a good way to get FOSS into closed platforms. I know there are supporters to web, but basically I view web as pretty limited in spite of all the work that's been done with it.
Templates in Django are nothing that I would call views in application programming. If I use data binding to hook up my controller state (in some way a wrapper around the model), then this has nothing to do with the M, V, or T in Django. It's a js object and not part of Django at all.
Templates are a decent way to somewhat modularize HTML/CSS without falling back to generating HTML/CSS from objects and giant data-structures, which would be torture. This is not what views do.