When I first contacted MVC mode, I learned it when I learned JAVA framework. At that time, M represented modal layer, responsible for data blocks, V represented View layer, responsible for page rendering, and C represented Contrllor, responsible for controlling interaction before and after.
This is the JAVA MVC pattern!
So what does the MVC on the front represent?
In the front-end MVC mode, M still represents Modal layer, which is responsible for interacting data with the background, V represents View, which is responsible for rendering DOM on the page, and C represents events bound to DOM elements. When an event in controller is called, the data in Modal is called, and then given to the View to re-render the data
What is the current front-end MVVM pattern?
At present, the most outstanding front-end frameworks are Vue and React. The core concept of these two frameworks is data-driven page rendering, and they are both frameworks of MVVM mode. In MVVM mode, M is still fixed Modal, V is still table dead View, which basically will not change. A page has to have two parts: data and rendering, so what’s changed is how you render Modal to View is changed, in MVVM mode, you bind View to Modal, and as soon as Modal changes, the View is automatically updated, you don’t need to write how to do DOM update as we thought