Home >Web Front-end >Vue.js >Is vue.js front-end or back-end?
vue.js is the front-end, it is one of the mainstream front-end frameworks. vue.js is a progressive framework for building user interfaces, with features such as lightweight, two-way data binding, and component-based development. Since vue.js only focuses on the view layer, it is very easy to learn.
vue.js is the front-end. It is one of the current mainstream frameworks for the front-end. Together with angular.js and react.js, it is also known as the three mainstream front-end frameworks. frame.
(Learning video recommendation: php video tutorial)
Related introduction:
Vue.js is a progressive framework for building user interfaces. Unlike other heavyweight frameworks, Vue adopts a bottom-up incremental development design. Vue's core library only focuses on the view layer, and is very easy to learn and integrate with other libraries or existing projects. Vue, on the other hand, is fully capable of driving complex single-page applications developed using single-file components and libraries supported by the Vue ecosystem.
The goal of Vue.js is to enable responsive data binding and composed view components through the simplest possible API.
Vue.js itself is not a comprehensive framework - it only focuses on the view layer. Therefore it is very easy to learn and very easy to integrate with other libraries or existing projects. On the other hand, Vue.js is also perfectly capable of powering complex single-page applications when used with related tools and supporting libraries.
The main features of vue.js:
1) Lightweight framework
Vue.js can automatically track dependent template expressions and calculated properties, and provide MVVM data Binding and a composable component system, with a simple and flexible API, make it easier for readers to understand and get started faster.
2) Two-way data binding
Declarative rendering is the main embodiment of two-way data binding, and is also the core of Vue.js. It allows declarative rendering of data using concise template syntax. Integrate into DOM.
3) Instructions
Vue.js interacts with the page, mainly through built-in instructions. The function of the instruction is to change certain behaviors accordingly when the value of its expression changes. Applied to the DOM.
4) Componentization
Component (Component) is one of the most powerful features of Vue.js. Components can extend HTML elements, encapsulating reusable code.
In Vue, parent-child components communicate through props, one-way transmission from parent to child. The child component communicates with the parent component and notifies the parent component of data changes by triggering events. This forms a basic father-child communication model.
When the components during development have a very close relationship with HTML, JavaScript, etc., the components can be customized according to actual needs, making development more convenient and greatly reducing the amount of code writing.
The component also supports hot reload. When we make changes, the page will not be refreshed, but the component itself will be reloaded immediately, without affecting the current state of the entire application. CSS also supports hot reloading.
5) Client-side routing
Vue-router is the official routing plug-in of Vue.js. It is deeply integrated with Vue.js and used to build single-page applications. Vue single-page applications are based on routing and components. Routing is used to set access paths and map paths and components. Traditional pages implement page switching and jumps through hyperlinks.
6) State management
State management is actually a one-way data flow. State drives the rendering of View, and the user operates the View to generate Action, which causes the State to change, thereby causing the View to Re-render to form a separate component.
Related recommendations: vue.js tutorial
The above is the detailed content of Is vue.js front-end or back-end?. For more information, please follow other related articles on the PHP Chinese website!