我是两年前端,熟练js,但是服务端知识薄弱,英语阅读能力也很差。买了《了不起的node》《深入浅出node》,网上的教程要么很老、要么是做实例类(搭服务器跑个hello word)的,始终无法入门。
求大牛指点该怎么学习~
PHP中文网2017-04-17 11:46:00
I think I am quite suitable to answer:
I am a senior in college this year. After interning in the company for three months, I voluntarily resigned in March this year to study node by myself.
First of all, you have to understand why you want to learn node, that is, the advantages of node. You can go to Zhihu about this issue. There is a lot of information on it.
After you decide to learn node, you have to be patient and read the simple shallow-level introductory documentation. You can click here to get started
After reading this, you must write something and sell something, otherwise you will feel sorry for yourself, so you can try this small practice, and it is best to think of ways to expand it yourself
Now that you have basic knowledge and a little practice, it’s time to make a complete project. You can click here to make a project
You can choose to check out the api on the official website (the Chinese version specially found for you)
After reading the API, you can try your own project. As you said, if you have worked on the front-end, you can use angular+node to develop a website, or check out socket.io to develop a chat room
One step at a time, now look back at the footprints you have walked, you have already gone very far~
Off topic, because when I came into contact with node, I didn’t have good js basics. I consolidated js first and then worked on node. In view of your experience, I didn’t mention it, but I still think the js basics are very important, regardless of Learn node or not~
阿神2017-04-17 11:46:00
First get familiar with the APIs of several common modules (fs, path, http, etc.), which are generally used for web services and gadgets. Practice the http module and fs module more. You can write a web service or crawl down a certain website, and then write a file operation tool, and you are basically ready to get started. The rest will come naturally once you get in touch with it.
PHPz2017-04-17 11:46:00
I have answered similar questions before.
"Amazing Node" may be that the code is relatively old now, and node and express iterate faster. Relatively speaking, "In-depth Introduction to Node" is not suitable as an introductory book.
The best way to get started is to do a complete project and establish a perceptual understanding first.
The following are my answers, including the selected study materials. As long as you follow them, you can basically write a blog. The main thing is to understand how node works as a backend. Undoubtedly, using a blog as a project practice is not very large, and it is certainly not too strenuous to learn, and you can basically understand what Node is all about.
Philosophy of learning: Learning by doing.
Tutorial:
Use Express + MongoDB to build a multi-person blog
"Node.js includes teaching but not skills"
Make a plan: study regularly and quantitatively, for example, study one chapter a day. Use trello to manage your learning progress and tick completed tasks, which helps you control your learning progress.
阿神2017-04-17 11:46:00
To learn node, you still have to make something with your hands. I was like this before. After reading the books you mentioned, I still feel that they are not very useful. First, I have a lot of knowledge, and second, I don’t know how to use them. Those two books The books are all for people with some basic knowledge. Muke.com also has some video tutorials. After watching them, I became a little more familiar with making a website. For example, I made my website while learning! In the future, you will have to take many steps to put your website online, which will improve all aspects!
伊谢尔伦2017-04-17 11:46:00
You can write a blog for yourself to get started, after all, the code you write will not be forgotten
In addition, you can study the community source code of CnodeJS https://github.com/cnodejs/nodeclub
If your English is good enough, there are a lot of good materials on Github, such as https://github.com/maxogden/art-of-node
高洛峰2017-04-17 11:46:00
You can try http://nodeschool.io/
I can download tutorials and provide good practice
PHPz2017-04-17 11:46:00
Stay away from async and get closer to promises
...I found that most of the people around me who were not taught by me to learn NodeJS were poisoned by async
Then the visual output of those who can change their ways and convert to promise generally increases by 50%
天蓬老师2017-04-17 11:46:00
To put it bluntly, lz still lacks training in relatively large projects. As long as you have some practical experience in node projects, everything will fall into place. You can learn all kinds of knowledge and understand various pitfalls from it. It is recommended to study other people's project code or do your own project. The former is slower, and the latter is faster.
迷茫2017-04-17 11:46:00
It is recommended that you play learnyounode first
https://github.com/workshopper/learnyounode
Simplified Chinese is translated by me