Elaborate on Django-web front-end and back-end separation

This week, I will bring you [51Reboot] operation and maintenance automation open class sharing. At 9:00 p.m. on April 26 (Thursday), our teacher Xianyu will give you a detailed introduction to Django - front-end and back-end separation of web.

Instructors

Mr. Xianyu: He used to be the head of operation, maintenance and development of an Internet used car company, and now works in the devops team of an Internet finance company. Leading and implementing multiple sets of tasks, resource management, visualization and other operation and maintenance management systems, good at server, Django, front-end engineering development.

so-called front-end separation

origin

  • Front-end development history

Features

  • Front end: responsible for the View and Controller layers
  • Backend: only responsible for the Model layer, business processing/data, etc.

Advantages and disadvantages

  • Advantages: decoupling, liberating the front end, clear responsibilities
  • Disadvantage: bad seo optimization

Restful style API should be the best practice of front-end and back-end separation

Elaborate on Django-web front-end and back-end separation

Front and rear design

Front-end: Node.js
Representative: AngularJS, react, vue
Elaborate on Django-web front-end and back-end separation

View

technical point

  • instruction
  • components
  • The life cycle
  • Front-end routing
  • Vuex
  • ES6 syntax
  • npm & webpack

Backend: Restful APIs

An interface style, the full name of Representational State Transfer, is not enforced

Representational State Transfer()

What does Uniform Resource Interface mean to URIs?

The Uniform Resource Interface requires the use of standard HTTP methods to operate on the resource, so the URI should only represent the name of the resource, not operations on the resource.

(understand this unity)

standard

Elaborate on Django-web front-end and back-end separation

Non-standard (resources are not unified)

Elaborate on Django-web front-end and back-end separation

practice

one example

  • "Library Management System"

technology stack

  • Frontend: Vue
  • Backend: Django REST framework

gist

  • Token verification
  • Front-end routing
  • Unified http request response interception processing
  • Restful API
  • Permission control (table level & object level)

As shown below:
Elaborate on Django-web front-end and back-end separation
Elaborate on Django-web front-end and back-end separation

Finally, whether to do a development mode that separates the front and back ends depends on the multi-dimensional considerations of the actual situation, and the appropriate one is better.

Sharing time: April 26, 18 (Thursday)

21:00-22:00
Sharing method:
webcast

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324839158&siteId=291194637