Nodejs from a novice without a door to take off the tutorial.

Source: Internet
Author: User

This is a rookie tutorial, this is a rookie tutorial, if you are rookie to talk.

In short, Nodejs is not a new language, but it can let our JS run on the server side, the server-side write JS code and input and output, that is, if someone asked you JS is not only run in the browser, you must not say, alas, yes.

--------------------------------------------------------------------------------

I remember when I first started to learn Html,css,js, I had to download a variety of browsers, because the compatibility problem t_t, but now there is a good news to learn Nodejs it does not have compatibility issues.

--------------------------------------------------------------------------------

If you want to know why Nodejs is not compatible with the problem, then you first understand why there is a compatibility problem, here I mentioned the front end is to say nodejs it is not the front end, is the back end, although looking very much like, but I regret to tell you it is not.

--------------------------------------------------------------------------------

Pull away, will go to the point, why the front-end compatibility problems, the main problem is the browser!!! You want to Ah, every browser is a different factory to do, the effect can be the same? Later, everyone is not happy, you say you write something only in his home, in other people's home is not, rely on, justice where. So later came out a third party is what we call the "the", this is a special responsibility to solve this problem, what problem? That is to say, as a middleman, he is responsible for defining standards, and their browsers must provide APIs for us to use as a standard. So why is there a compatibility problem? Then again, people just set the standard, but others must follow his do, it is too naïve.

--------------------------------------------------------------------------------

But rest assured that the compatibility will become less, why? You want to ah, most of the browser provides the same API, as you provide different, developers can be happy, developers are not happy, who is willing to use his home browser, or not to live, look at the years ago IE and now ie.

--------------------------------------------------------------------------------

OK, then again, since these compatibility issues are browser made ghosts, now nodejs do not need a browser, but also compatible with what is it, so, we have learned the BOM and Dom nature can not be used in Nodejs, because there is no browser ah, you also operate what DOM, Another important thing is Nodejs it allows us to operate local files, which is very important, a language can not manipulate the file how much some pity, want to let JS operation file can be done, but the browser does not let JS do this, because it is too dangerous, such as you go to visit a person's website, It uses JS to write a program to delete the contents of your computer system, or to read your privacy, which is also ah, but the server side is not the same, because you write the code is only in your own server running, it is difficult for you to destroy your own computer. A little messy, huh? All right.

--------------------------------------------------------------------------------

Summarize what you learned today:Nodejs allows JS to be used in the server, because there is no browser to join, so there is no compatibility problem, naturally there is no BOM and DOM, and can operate local files .

Nodejs from a novice without a door to take off the tutorial.

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.