There are no analogs to the analog front and backend and the MVC model. For example, a site administrator (Django) is generally considered part of the backend - it is not part of the site that the user sees, but part of the administrator is a specific part of the MVC model. Everything that a regular web user sees and / or interacts directly with is part of the interface, everything else is part of the backend.
Now, what is the MVC framework used in Django? We have:
- Model: This is the part of the application that contains the state of the application. In Django, most of this is a database and an abstraction layer - Django models. Other parts are user sessions and the
request variable. - View: This is the part of the application that represents the state of the application to the user. The views and patterns of Django are responsible for this. Any data that you see when you open the website is part of the MVC view. A general presentation is also part of this.
- Controller: this is part of the application that represents any action that you, the user, takes. Django is not really a shared MVC environment, because the View part and the Controller part are so closely intertwined: any link, form or button that you see on the site is a controller. It tells the site to perform an action, for example, to present another view (for example, a link) or to change the state of the model (for example, an editing form).
What is Backbone or Angular? Why do you need two different MVC frameworks in one application?
Django is a server environment. Each action takes place on the server. If you click on the link or submit the form, you will send a request to the server and the server will send a full static response (static in the sense that the page will not change after viewing it in your browser). You cannot use Django to use the logical client side, since it is a python framework that runs on your server, and not in your client browser. Instead, it is a Javascript job to add any client logic, for example. reorder the list of items on the page or dynamically add a new one. Now each page can be seen as a kind of mini-application.
Backbone and Angular are examples of MVC frameworks for such client applications. It delivers client-side application logic, which is not server-side like Django, and, surprisingly, people who like the MVC environment for developing a server application usually also like to use the MVC environment for developing a client application.
source share