node. JS Latest web technology stack (May 2015)

Source: Internet
Author: User

Nodejs is relatively simple, only you have the front-end JS Foundation, then follow my approach! A week is enough.

Recommended Technology Stack
    • Express 4.x (the latest version of the Express, beginners first don't touch koa)

    • Mongoose (MongoDB)

    • Bluebird (promise/a+ implementation)

    • Jade (view layer template)

    • Mocha (Test)

    • Node-inspector (Debug)

Https://github.com/i5ting/express-starter

Learn about HTTP protocols, especially forms and Ajax values, and how to receive them in req
    • Absolute address and relative address

    • QueryString

    • URLs and URIs

    • HTTP status Code

    • HTTP verbs

    • 3 ways to take parameters of req

    • 3 different types of post

    • Command-line gameplay

    • SuperTest usage

    • What is rest?

http://i5ting.github.io/node-http/

Understand DB related operations, first to Mongoose
    • CRUD (Increase and deletion)

    • Understanding pagination

    • Understanding the relationship (1 to many) how to achieve it in mongoose

    • Understand the difference between statics methods and methods

    • Understand the difference between pre and post

    • Understanding the plug-in mechanism of mongoose

    • Understand the role of M in MVC, and what kind of code should be put into the model

    • Understanding Index Optimizations

    • Understanding the deployment of MongoDB

Understanding the promise/a+ specification and avoiding callback traps reasonably
    • Understand the async of node

    • Understand the nausea of async

    • Learn about asynchronous basic scenarios, such as waterfall, how to deal with async

    • Understand Q and Bluebird usage (if you have ANGULARJS experience, recommend Q, others are recommended only Bluebird)

    • Understand the Promisifyall usage of bluebird

    • Learn how to refactor processes and the readability of your code

Use TDD/BDD testing to minimize problems

The benefits of testing, here do not say, but one thing is to say, node debugging is difficult, often not as fast as writing tests, recommend learning

    • Understand the smallest problem thinking, cultivate the programmer's strong heart

    • Basic usage of Mocha

    • Understand the use of assertions such as Assert/should/expect

    • Understanding the Test life cycle

    • Understand the done callback

    • Understand how to simulate data

    • Understanding the SuperTest test under HTTP

    • Understanding Test Coverage

    • Understand the automated test method based on gulp

If you are interested, you can learn more BDD/TDD content, even cucumber.js

You're going to do it anyway.: Commissioning

There are 3 ways to debug

    • Node debug (too bad, if not C, understand the ADB and other people do not recommend)

    • Node-inspector (Recommended 4※)

    • TDD/BDD (Recommended 5※)

See more content and videos

https://cnodejs.org/topic/5463f6e872f405c829029f7e

Welcome to my public number "node full stack"


node. JS Latest web technology stack (May 2015)

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.