First, what is the MVX framework pattern?

MVX framework mode: MVC+MVP+MVVM

1.MVC: Model +View + Controller, mainly for the purpose of layering, so that the responsibilities of each other are separated. View communicates with Model through Controller, which is the coordinator between View and Model. View does not directly communicate with Model, and the basic contact is one-way. The User uses the Controller Controller to manipulate the template Model to change the View.

2.MVP: Evolved from the MVC Model, which is responsible for logic processing by Controller/Presenter + data provided by Model +View display. In MVP, Presenter completely separates the View from the Model, and the main application logic is implemented in Presenter. Presenter and View are not directly related to each other, but interact with each other through a defined interface that allows the Presenter to remain the same when changing the View. MVP mode framework: Riot, JS.

3.MVVM: MVVM is to change the MVC Controller and MVP Presenter into ViewModel. Model, View and ViewModel. Changes to the View are automatically updated to the ViewModel, and changes to the ViewModel are automatically synchronized to the View. This automatic synchronization occurs because properties in the ViewModel implement an Observer that triggers actions whenever properties change. The frameworks for the MVVM pattern are AngularJS+ vue.js and Knockout+ ember.js, the latter two less well known and early framework patterns.

What is vue.js?

Seeing the framework pattern description above, we can see that it is a framework belonging to the MVVM pattern. What are its properties? Vue.js is not really a framework because it focuses only on the view layer and is a library for building data-driven Web interfaces. Vue.js provides efficient data binding and flexible component systems through a simple API (application programming interface). Vue.js has the following features:

1. Lightweight framework 2. Bidirectional data binding 3. Instructions 4

How does vue.js differ from other frameworks?

1. Differences from AngularJS

Similarities:

  • Both support directives: built-in directives and custom directives.
  • Both support filters: built-in filters and custom filters.
  • Both support bidirectional data binding.
  • None of them support low-end browsers.

Difference:

  • 1.AngularJS is expensive to learn, such as adding Dependency Injection, while vue.js provides simple and intuitive apis.
  • 2. In terms of performance, AngularJS relies on dirty checking of data, so the more Watcher, the slower it is.
  • Vue.js uses dependency tracing based observations and uses asynchronous queue updates. All the data is triggered independently.
  • For large applications, this optimization difference is quite obvious.
2. React

Similarities:

  • React uses a special JSX syntax, and Vue. Js is also used in component development. Vue has a special file format, and has conventions for file contents.
  • The central idea is the same: Everything is a component, and component instances can be nested.
  • Both provide reasonable hook functions that developers can customize to handle requirements.
  • None of them have column count AJAX, Route, etc. built into the core package, but are loaded as plug-ins.
  • The feature of mixins is supported in component development.

Difference:

  • React relies on the Virtual DOM, whereas vue.js uses the DOM template. React uses the Virtual DOM to do dirty checks on rendered results.
  • Vue.js provides instructions, filters, etc. in templates that make it easy to manipulate the DOM quickly.