search

Home  >  Q&A  >  body text

node.js - 我是一个做前端的,求教如何学习vue,node等js引擎?

一直在做写静态html,ajax数据对接之类的工作,有点js基础,jquery也常用,想着以后就走前端这条路了,原来是用for循环拼接html,现在用到模板引擎,想提高一下自己学习一下vue等js引擎,从何下手求大神指一条路,另外能否解释一下vue在项目中有什么具体的用途吗?除了作为模板使用以外还能代替什么工作?

麻烦了各位前辈,在此谢过~~~~~~~!

天蓬老师天蓬老师2785 days ago750

reply all(8)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:04:53

    What is Vue?
    Vue is more than just a template engine, it can build data-driven web interfaces.
    Vue implements two-way data binding, which can avoid directly operating the dom. Maybe you have no idea about this. Please briefly make up the lesson "MVC, MVP and MVVM Illustrations"
    The most obvious difference is , when you usually write a page, most of the time you have to use jquery to operate the dom to control certain state changes. However, with vue, because it is data-driven, the state changes are directly bound to the dom of the page, and there is no need to operate the dom. Feel it for yourself.

    Scenarios for which vue is applicable
    1. Applications with complex forms;
    2. Single-page applications that do not need to consider SEO;
    3. Internal systems;
    4. Applications that do not need to support lower versions of IE browsers;
    5. Other web applications with shells;

    Pure template engine
    vue is not a pure template engine, it should be classified as a front-end framework that implements MVVM. What the template engine does is just render the page. You can render on the front end or on the back end. If you introduce a template engine into a front-end page, then you are rendering on the front end. If you introduce a template engine into a back-end framework such as express, you can achieve back-end rendering. Commonly used template engines include handlebars, ejs, jade, swig, nunjunks, artTemplate, etc. Personally, I think the simplest template engine is artTemplate, but in terms of powerful functions, it is swig/jade. It is recommended to start with artTemplate.

    What is node?
    The explanation from the official website is "Node.js is a JavaScript running environment based on the Chrome V8 engine. Node.js uses an event-driven, non-blocking I/O model, making it lightweight and efficient. npm, the Node.js package manager, is the world's largest open source library ecosystem. 』Maybe you don’t know what this means, and I don’t know how to explain it. You should play it yourself, and then you will gradually understand it. You can take a look at this "node teaching is not guaranteed". When you start to want to learn some background knowledge, you can take a look at N-blog.

    How to study?
    Chewing the documentation is the best way out. If you don't understand it once, you can definitely understand it after reading it three times. You need to calm down and don't look for tutorials everywhere. There are tutorials in the document itself. .

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 15:04:53

    Personally, I feel that learning JavaScript frameworks is nothing more than learning based on the native JavaScript language. Therefore, in order to better learn these js frameworks, you have to have a deep understanding of the js language. I recommend reading and understanding the source code of underscore.js first. , in this way you will find that your original learning of js is not comprehensive. Then for the front-end framework, reading documents is a good way, especially vue.js already has Chinese documents, which seems to be faster, but node is hard. Click to take a look at the official English documents. Although there are many and they are in English, I insisted on reading them. Then for node development, you can try the koa framework, a lightweight background framework. The js callback writing method is very comfortable and you will understand it if you look at it in detail.

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 15:04:53

    I am also learning node recently, and I feel that it is really a hard nut to crack. When I read node, there are many extended knowledge points in it, and then I went to tutoring, and then I found that there are too many things to master, and I don’t even know them now. Where to start. I asked Niu Niu who knows node before, and he said that the best way to learn node is to understand a background language. . . .

    reply
    0
  • PHPz

    PHPz2017-04-17 15:04:53

    Learning by reading documents means learning some concepts

    reply
    0
  • 迷茫

    迷茫2017-04-17 15:04:53

    vue does not understand
    node.js. I also think it is better to learn a simple backend language later, otherwise it will be difficult to understand the advantages of node.js.
    If you want to learn node.js directly, go to YouTube to find a few videos to get a feel for it, and then go to github to search for some short projects to take a look.
    If you don’t have background language knowledge, it is not recommended to read the official documentation directly, because after reading it for a long time you still can’t write anything.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 15:04:53

    I feel that before writing nodejs, I need to catch up on the basics of js and take a look at the syntax of es6.
    As soon as you enter the front-end, it is as deep as the sea, and the skill tree explodes instantly when you click on it. Take your time.
    VueJS is very easy to use. 2.0 has just been released recently, let’s join in the fun.

    reply
    0
  • PHPz

    PHPz2017-04-17 15:04:53

    I suggest that your learning path is as follows:

    1. HTML

    2. CSS

    3. Javascript

    In the process of learning, you must do more projects. For example, writing a SegmentFault homepage, it is best to do two or three projects, and the layout should not be the same

    After completing the above tasks, you can get in touch with node and webpack. You don’t need to be too deep, because node is too deep and belongs to the big front end. Once you understand these tools, you can get in touch with the front-end framework. , for example, first understand the following three popular frameworks:

    1. vue

    2. angular

    3. react

    Then I will do some small projects, comprehensively choose the framework that suits me, and finally write code happily.

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 15:04:53

    Nodejs is a perverted framework that can turn the front-end into a full-stack. In fact, it is learning the back-end and using the JavaScript language.
    Of course, before learning, you can first understand what a server is, what routing is, and the http protocol. It doesn’t have to be in-depth.
    Nodejs Getting Started Tutorial I got started by looking at the code here.
    Then learn the standard MongoDB. Well, you can develop a complete website at will.
    The next step is to go to Alibaba Cloud, NetEase, or something to buy a cloud server ecs.
    Then buy a domain name
    Domain name registration
    Then become a webmaster
    Looking back, I walked away for a long time~~

    reply
    0
  • Cancelreply