Vuejs Development Notes-ide selection and Webstorm performance optimizations, framework features and data invocation, routing configuration, and rationale

Source: Internet
Author: User

One, the IDE's choice:

Vscode and Webstorm are good choices, both run debugging are very convenient to use shortcut keys to run and stop, on the speed of opening the project and the requirements of the computer configuration, vscode than Webstorm to be much better, If the computer configuration is good enough, please ignore the previous performance problem, the specific use depends on the needs and hobbies of the individual.

1. First say the configuration of Vscode:

First of all, to install Vscode extension, click the last icon in the upper left corner, enter JavaScript in the search (ES6) Snippets/npm/vue 2 snippets;

Second-Step Debug configuration: Vscode First run only need to switch the project to the project root directory/build/ Dev-server.js Click the Run button or use the shortcut key F5 can start the project, the first boot after the IDE will start the JS record, the next time no matter in that page only need to use F5 boot can;

2. Again webstorm use optimization and Debug Configuration of the Vuejs project :

①. Optimize webstorm to solve the problem of stalling.

Webstorm optimization is mainly in the setting of memory, prevent WS card dead, set the steps as follows: Webstorm Install the home directory >bin>webstorm.exe.vmoptions, change the second line:-xms526m, the third row:-xmx1024m;

②. Configuring Vuejs Debug JS You do not need to lose the NPM run Dev Start command.

    

  

Second, Vuejs framework features and data invocation:

  Framework Features: Pure front-end language, to cooperate with the background interface to achieve data exchange, Vuejs equivalent to a compilation tool, the code you write and rely on the three-party library, compiled into a browser can recognize the JS language and HTML pages, all the business in the user's browser side execution.

  Data invocation: Since it is a client language then it is extremely difficult to get Vuejs to do server-side rendering (SSR), which is what the authorities say:

" after the release of 2.3, we released a complete guide to building the Vue service-side rendering application. This guide is very thorough and suitable for developers who are already familiar with Vue, Webpack and node. JS developers. Please take a ssr.vuejs.org. (currently only in English, the community is in the Chinese version of the translation)", Vuejs on the server-side rendering is very thankless (of course, interested friends can try to build and render SSR, for in-depth understanding of the principles of a language is very helpful), Since Vuejs is not good at server-side rendering, we still focus on the front-end operation of Vuejs, then a foreground site to remove the most direct way to use the background is AJAX or RPC remote call, Ajax use can use some excellent framework, such as Axios, Zeptojs and so on, these can meet the demand, of course, if using RPC can use Hprose and so on.

The specific commonly used AJAX request call way and method, I do not elaborate here, need to be self-Baidu, Vue official recommended Exchange frame is Axios View details: Https://npm.taobao.org/package/axios;

Third, the Vuejs routing configuration and principle

  

  

  

Vuejs Development Notes-ide selection and Webstorm performance optimizations, framework features and data invocation, routing configuration, and rationale

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.