Nodejs Notes Introduction

Source: Internet
Author: User

Open Experience Library Nodejs Learning Roadmap: 1.Nodejs Introduction; 2.15 nodejs application scenarios; 3.Nodejs Learning Roadmap

Open Experience Library seven days to learn nodejs:1. Nodejs Foundation, installation, module; 2. Organization and deployment of code; 3. File operation;

4.API introduction;

node. JS is a platform built on Chrome's JavaScript runtime that makes it easy to build fast, extensible Web applications. node. JS uses event-driven, non-blocking I/O models, which are lightweight, efficient, and can work seamlessly with data at all times and on different devices.

Several advantages of node

    • 1. Nodejs based on the JavaScript language, there is no need to learn a new language alone, thereby reducing the threshold for learning. At the same time, the JavaScript language in the Web front-end development is very important, especially HTML5 application must use, so the front and rear unified language, not only can realize the programmer's full stack development, but also can unify public class library, code standardization. On this point alone, Nodejs has won the favor of the market.

    • 2. Nodejs did not re-develop the runtime environment, but chose the fastest browser kernel V8 as the execution engine, guaranteeing nodejs performance and stability.

    • 3. The development of NODEJS is very efficient, and the code is simple, proud of the Nodejs single-threaded mechanism. Another feature of Nodejs, asynchronous programming, gives Nodejs an obvious advantage in processing IO-intensive applications. Personally, using Nodejs is 10 times times more efficient than Java for web development, and simpler than PHP code.

    • 4. The Nodejs community is growing, not only the number of packages is increasing rapidly, but also the quality of the package is significantly better than in other languages. Many star-level packages are simple and dexterous, designed for the use of developers. My most commonly used toolkit, such as Socket.io, Moment.js, Underscore.js, Async.js, Express.js, Bower.js, Grunt.js, forever.js ...

Nodejs not suitable for the field

     each language or platform has a bad domain, and for nodejs, the least adept area is CPU and memory programming.

    • 1. Compute-intensive applications that allow JavaScript and C to spell compute performance are unlikely to win.

    • 2. Memory control makes it difficult for JavaScript and Java to compare complex data type definitions. Because JavaScript's object-oriented is JSON-based, Java uses the memory structure directly. So, with the JSON serialization and deserialization process to control memory, JavaScript has lost.

    • 3. For large memory applications, because the V8 engine has a limited memory design, the largest heap in 32-bit environments is the largest heap in the 1g,64-bit environment and less than 2G, and if you want to read 10G data at once, it will not be possible for Nodejs.

    • 4. Static server, although the advantages of nodejs in the IO dense set application, but with nginx processing static resources still have a big gap.

    • 5. Applications that do not need to be asynchronous: such as System management, self-scripting, or Python, Nodejs asynchronous calls can cause problems with programming.

NODEJS Web Development Application Scenario:Express + EJS + mongoose/mysql

Express is a lightweight and flexible Nodejs Web application framework that allows you to build websites quickly. The Express framework is built on the Nodejs built-in HTTP module, and re-wraps the HTTP module to the actual Web request processing functionality.

Ejs is an embedded JavaScript template engine that generates HTML code by compiling.

Mongoose is a MongoDB object Model tool that allows access to MONGODB operations through the Mongoose framework.

MySQL is the communication API that connects to MySQL database and can be used to access MySQL operations.

Web development is usually done with Nodejs, which requires 3 frameworks to work with, like SSH in Java.

650) this.width=650; "src=" Http://static.open-open.com/lib/uploadImg/20140624/20140624094917_948.png "alt=" Nodejs Learning Road Map "/>

Start from scratch Nodejs series articles

This article is from "Whispering Autumn Wind" blog, please be sure to keep this source http://xjhznick.blog.51cto.com/3608584/1528480

Nodejs Notes Introduction

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.