Part 2 of vue, the first vue program

A vue mvvm practitioner

1.1 Introduction

  • Model: Model layer, where JavaScript objects are represented

  • View: The view layer, where DOM (element of HTML operation) is represented

  • ViewModel: middleware that connects views and data, Vue.js is the implementer of the View Model layer in MVVM

  In the MVVM architecture, data and views are not allowed to communicate directly, only through ViewModel, and View Model defines an Observer observer

  • ViewModel can observe data changes and update the content corresponding to the view

  • ViewModel can listen to changes in the view and can notify the data of changes

  So far, we understand that Vue.js is an implementer of MV VM, and its core is to realize DOM monitoring and data binding

Guess you like

Origin blog.csdn.net/u011066470/article/details/132642131