Nodejs from the doorway has no door rookie take off must see the tutorial _node.js

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, in the server to write the JS code and input output, that is to say, if someone asks you JS is only run in the browser, you mustn't say, alas, yes.

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

If you want to know why Nodejs does not have a compatibility problem, then you first know why there is a compatibility problem, here I mentioned that the front-end is to say Nodejs it is not front-end, is the back end, although looks like, but I regret to tell you it is not.

Pull away, will come to the point, why the front-end has a compatibility problem, the main problem is the browser!!! You want to Ah, every browser is a different factory to do, that effect can be the same? Later, everyone is not happy, you say you write things can only be in his home, in other people's home is not, rely on, what is the heaven. So then came out a third party is what we call the "the", the consortium is specifically responsible for solving this problem, what problem? This means that the web is a middleman, and he is responsible for defining standards, and their browsers must provide the API to the programmers to use it as a standard. So why is there a compatibility issue? Then said back, they just set the standard, but others must follow his do, it is too naïve.

However, after the peace of mind will be less compatible, why? You want to Ah, most browsers provide the same API, as you provide a different, developers can be happy, developers are not happy, who would also like to use his home browser, or do not live from the evil, in look at the years before the IE and now ie.

OK, that's it again. Since these compatibility problems are browsers make ghosts, now nodejs do not need a browser, but also compatible with what, in this case, our previous study of the BOM and Dom naturally 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 manipulate local files, this is very important, a language can not operate the file how much some pity, want to let JS operation files can be done, but the browser dare 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 remove the contents of your computer system, or to read your privacy, which is also good, but the server side is not the same, because you write the code is only in your own server running, it is difficult not to destroy your own computer. A little messy, huh? All right.

To sum up what you have learned today: Nodejs allows JS to be used in the server because there is no compatibility problem without the browser, and there is naturally no BOM and DOM, and can manipulate local files.

Above this article Nodejs from has the doorway to have no door rookie to take off must see the course is small arranges to share to everybody's content, hoped can give everybody a reference, also hoped that everybody supports the cloud habitat community.

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.