How to Start Learning Node.js
- Cyanny Liang
I have always wanted to do some meaningful projects, not the homework project at college, not the debug working at company. I just wanted to start a meaningful project for interest, or for fun. Maybe it will become a big success. and I believe in that. And recently I am busy with a spark prject based on Node.js.
In short, I think the advantages is:[more…]
- Same language on both server side and front side
- Event-driven and callback feature gains perfect performance
- With WebSocket, you can built great real-time app, like online chat room
- Worth to learn, it’s new, and will give you a new perspective of web development
This a short blog that can help you overview Node.js, learn some basics of Node.js, you can finish it within 30 min.
The Module system of node is worth to dig, read the api, especially the concept of exports and the module.exports
Before programming, learn the programming style of node.
NPM coding style
This is the npm coding style. At the beginning, indentation with 2 spaces make me uneasy. But now I am used to it.
The beginning book is really great, Even though it has more than 70 pages, I finished it and learned a lot. I followed the example in the book, build a simple blog demo. And the code in the book had some tiny issue. I have uploaded the demo to my github, node-simle-blog-demo.
BTW, the book will teach you how to run linux command by node Child Processes, sounds interesting.
After learning how to build an application stack from the beginner book, you can start express now, finish the guide, understand the basics of the great web framework express. BTW, in node community, there are large amount of web framework. Like Tower.js, meteor.js, derby and so on. But express is the most popular and is supported by many people. I recommend it.
The book recommended by express guide has more than 400 pages. Don’t withdraw, insist on it, you can follow the book example, and learn more details about node. I haven’t finish it, because I want to start my project more quickly, I just walked to Chapter4.
The callback model and event driven explained in the book is great. Especially the muti-chat room by socket.io gave me a deep impression.
7. Now I am fed up with tutorials, I decided to build something by myself. I build a file uploader/downloader with express. FileManager
I build PartyTime based on the demo. The demo is a blog with passport and authentication function. Worth to learn
Although mongodb provide nodejs api, I think the middleware is more better than the origin mongodb API
Lean basics about mongodb, especially the Data Modeling method.
13. Node Cloud
This is a resource directory gathering sites related to Node.js.
14. NPM Finding and uploading npm package.
15. Some api worth to read: Modules, Child Processes, Crypto, File System, HTTP, Events, Path, QueryString, URL.
Many tutorials, no matter how to lean, enjoy the learning process and the final sucess! Don’t waiting for finishing every details before starting your project.