6 Steps to Learning node. js

Source: Internet
Author: User

6 Steps to Learning node. js

From just contact with node. js to now, oneself is also all the way to touch tumbling climbed over, although not to say is what master, but for how to learn node. js, still have some personal opinion, take out with everybody to encourage ~

There are roughly 6 steps or 6 levels to learn about node. JS:

The first step

For newcomers to new node. JS, the first step is to lay the groundwork, and you need to figure out the following:

    • JavaScript features and syntax. If you are unfamiliar with JavaScript, recommend books and links:
      • JavaScript Recommended Books List
      • In-depth understanding of JavaScript series
    • What is node. js? What is the difference between node. js and JavaScript?
    • What are the advantages of node. js? What are the drawbacks of node. js?
    • node. js applicable scenario? scenarios where node. js is not applicable?
    • The basic syntax for node. js. Features of node. JS:
      • Single Thread
      • Asynchronous IO
      • Event-driven
    • What is NPM? Basic usage of NPM
    • Repl
    • Wait a minute

In fact, the above content, most of the node. JS books are introduced. After a basic understanding of node. js, we can write some Hello World programs:

    • Build an HTTP server and return Hello, world. (Use HTTP module)
    • Reads a TXT file and displays the contents to the command line. (using FS module)
    • Wait a minute
Step Two

You might think that node. js is the only thing that can be done with a few poor core modules. Don't worry, NPM currently has nearly 7W of third-party modules, monthly download volume of up to 210 million (2014-4-20 data) ... This is where node. js is alive. When you know the same about node. js, you can't resist the temptation. At this point, we might as well do something fun with node. JS's third-party module:

    • Build a microblogging site
    • Build a blog site
    • Build an online chat room
    • Write a simple crawler.
    • Call some website API to do something fun
    • Wait a minute

However, it's not that node. JS can do just that, and almost any other language can do something that node. js can do, and in some cases it can do better.

Step Three

Of course, just like to learn JS can not only use the framework, Learning node. JS can not only use external modules. At this point, we need to look back into the use of the node. JS Core module. To be blunt, just look at the official node. JS API documentation. Look at the document is the code of the agricultural necessary skills, English bad children's shoes browser loaded with a Word translation plugin.

Fourth Step
    • More practice. Whether using a core module or an external module, try to solve a problem with node. js or replace code that was previously written in another language.
    • Read the source code. Read the source here is not to say to read Node or other large framework of the source code. This time, pick some simple to implement a specific function of the tool module of the source read, this module code is usually in hundreds of lines, it is not very difficult to read, but can rise a lot of posture. Like what:
      • Underscore (learn JavaScript grammar and tricks)
      • Wait a minute
Fifth Step

Stick to the fourth step. When using node. js, when you find that there are no suitable module choices or modules to choose from, you can try to create a module or modify an existing one, and use NPM to publish your own module or to get PR on GitHub on that module.

Sixth step
    • More practice. This doesn't have to be explained.
    • Read Node source code and the larger framework of the source code. Improve the essentials
    • Pay more attention to the cattle people on GitHub
    • Repeat 第1-6 Step

PS: Throughout the time is to buy a few of the book node. JS read, recommend "in layman node. js".

6 Steps to Learning node. js

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.