Duration of Course: About 2 weeks
Why Learn Node.js
How Not to Learn Node.js
- Although a number of Node.js tutorials exist online, most lack the comprehensiveness necessary for learning Node.js properly. Moreover, you can easily spend a frustrating fortnight trying to find and discern the worthwhile tutorials from the fruitless ones. I read a good bit of Node.js tutorials when I learned Node.js a few years ago. I also wasted a good bit of time on many of them. I have done the hard work so you don’t have to go digging for Node.js tutorials.
- Don’t go to Amazon and choose a Node.js book based on the reviews. Even though this is the customary way to decide on a book, because Node.js is still a new platform, most of the books don’t have a large enough sample of reviews to provide you with a clear picture of the book’s usefulness and value. And collectively, the reviews are not great.
I have no idea if this book is well written or not because the formatting is so bad as to make it virtually unreadable in some places.
Obviously, the author of this review has not read the book and his review is completely about the formatting, which I have not experienced. I would give the book 5 stars because it is by far the best Node.js book I have read.
Also note that I know neither of the authors of the two books I recommend in this article.
- Get a copy of The Node Beginner Book by Manuel Kiessling. It is a tiny book: it is really a Node.js tutorial. The book sells in a bundle with another book, Hands-on Node.js written by the aforementioned Pedro Teixeira, for $9.99. But interestingly, I didn’t find the companion book (by Pedro) to be as useful, so you don’t need it and we will not use it in our study of Node.js. But since you get both books for $9.99, take the deal and run. Get the Node Beginner Book here:
- Get a copy of:
Road map to Mastering Node.js
- Read chapter 1 of Professional Node.js and follow the instructions on how to setup Node.js on your development computer.
- Read the entire Node Beginner Book. As I noted above, it is a tiny book; basically a tutorial. This tutorial will give you a gentle introduction into Node.js and a very basic understanding of what Node.js development involves. It is good to start with this before you read the rest of the Professional Node.js book.
- Read chapter 2 of Professional Node.js.
- Read the CommonJS section of the article at the link below. You need not read the entire article. Here is a link to just the CommonJS section.
- Read chapter 3 to 6 of Professional Node.js.
- Read the entire Part III section (chapter 7 to 15) of Professional Node.js.
- Optional: If you have got the Smashing Node.js book I referenced earlier, read chapters 8 and 9.
- Read chapter 17 to 22 of Professional Node.js.
- And finish up by reading the last 3 chapters of Professional Node.js.
- With a complete understanding of Node.js and Backbone.js, you are ready to build any type of web application. You can build a startup at this juncture, if you are intrepid enough.
But before you head off for your adventure, build the NodeApp web application at the link below; this exercise provides you with a real-world practical in Node.js/Backbone.js web application development:
And you have to learn more MongoDB (unless you are suing some other database) to build serious web applications. You can get my MongoDB book, which covers everything you need to know about MongoDB to build sophisticated web applications.
Stay the course until you complete the entire road map. Don’t give up. And don’t take longer than three weeks to complete it.
Be good. Sleep well. And enjoy coding.
Twitter led me here. There’s wrong link : for “entire article” in point #5. Didn’t finish reading the article and didn’t start reading “Professional Node.js”, but your approach seems nice and I DO want to master Node.js, Backbone and the other stuff mentionned. Thanks for the pointers. !
Thanks for pointing out the broken link, DjebbZ.
I just fixed it.
Thanks also for the kind words 🙂
This could not possibly have been more hlepful!
Sorry no matches found for not possibly or words like impossible in programmers dictionary.
Pingback: Learn Node.js Completely and with Confidence « thoughts…
Glad I found your blog. As a newcomer to server side JS, I think your “sweat” recommendations will help many newbies skip a painful first step… digging through dirt to find gold.
Kudos… and Thanks!
Pingback: Why to consider Node.js for your mobile web apps? - langoor.mobi Blog
Thank you very much for the wonderful words, Anthony. I am happy to hear the website is helpful.
Hey great article. Nowadays we have everything at our fingertips, yet we don’t know in which order to digest it since its so much. Showing a basic path on achieving things and limiting the consumption is crucial, thanks.
Thank you, Ignacio.
I am happy to hear the roadmap was helpful.
Thanks a bunch for the blog, it has been very helpful. I had a question regarding your e-commerce app. Are you using some kind of CMS for your client? From what I gather node doesn’t have any mature CMS yet. Anything I don’t know about? The project I am working on has a lot of products, therefore I value a good CMS very much… Anyways, I guess I am just wondering if there is a good CMS solution for e-commerce in node.js?
I am not using a CMS for that app, but I did offer to build one for the client, which they did not want at the time, since they only sell one product.
I have not seen any Node.js CMS either, but to add CMS functionality in the eCommerce app I created would not have been too difficult, although it would have been specific to that eCommerce app and not versatile like most open source CMS solutions.
I suspect we will see some Node.js CMS’es in the next couple years.
Richard I have a vps with nodejs installed, Now I am trying to get a site built with node and express up and running, what do I need to do to get it up and running? I have my nameservers pointing at the url but I can’t seem to keep an instance running, and I don’t want the URL to be something like this:
Can you point me in the right direction or make a tutorial?
I am definitely not a server admin guru, but the engineer who setup Node.js on our server passed on these instructions:
1. Use the following guide to install node.js: https://github.com/joyent/node/wiki/Installation
To install NPM, use the following guide: http://npmjs.org/doc/README.html
To install Express, use the following: http://expressjs.com/guide.html
For the installs, you can modify the install directory to /opt/node
You will need an initscript, instructions can be found here: https://gist.github.com/715255
(have to modify certain parameters to match your configuration)
Each app.js requires an initscript.
Thanks a bunch Richard, I’m actually doing pretty good. I have node, npm , git, basically a LEMP stack set up with PHP5.4 and a postgreSQL and a mySQL set up for good measure and mongoDB to take care of the noSQL side of things. This is a great learning experience for me, working on setting up NGINX reverse-proxy for the nodejs application. I will be able to host up to 18 sites on this puppy.
Pingback: Learn Node.js Completely and with Confidence | ...
Honey-Boo-Boo reference.. in object article classic 🙂
Have you thought of writing a series of articles on the node.js Express framework and writing libraries for it? (unless that’s in some of the professional node.js book).
Again loving the site, thank you for such wonderful examples.
Thanks for you comment 🙂
I don’t plan to write on the Node.js Express framework anytime soon, because it is covered (a full section) in the book I recommended above.
I’m looking forward to your article about MongoDB
Alright, I have it queued up for next, after the HTML5/CSS3/Responsive/Bootstrap 3.0 tutorial I am set to publish on Monday.
I would like to see a tutorial, some references about how to create CMS in node js, if you will have time for this in the future.
Hi, Thanks for you advise here. Can you advise how many hours per week you should spend on doing this?
1. What is the value of a database system over a JSON file and AJAX?
2. Are server applications (something like a server.js node file) executed? If so, how do they live with any permanence?
3. Do I need a unique port number for my application?
4. It seemed from my knowledge of Backbone that much of what Node does could also be accomplished in a different way with Backbone: is this true? What does Node do that Backbone can’t?
5. If I install Node on my developing computer, do I also need to install it on whatever server space I’m using? (I’m just using the space Columbia allots us…).
6. Where can I read about the web stack, abstracted from any language? I don’t think I understand it.
See my answers inline below.
With a database system, which is relatively simple to use these days, especially with NoSQL databases like MongoDB, you can store data in a structured manner and with relationships, and you can access all the contents in the database and perform queries, additions, and updates, and you can perform searches (including optimized searches with indexes) rather easily.
I can literally type another 20 or 30 advantages with databases over a JSON file, but you get the point, a file has no match against a database. Note that you can easily use AJAX with a database, which I am sure you are already aware of.
Excellent question. They are executed on the server by the node.js engine, which was built on C++, btw. The reason the files remain as JS files permanently is because they are not destroyed or compiled over, they remain on the server in their pristine state, just like any PHP, ASP, Java, and other server-side language files.
Another great question.
You can acutally do quite a bit with Backbone.js alone, even without a server side REST API or database, by using localStorage to save data. But a server side language is best used to store data permanently in a database and to secure some aspects fo your code. As you would imagine, you wouldn’t want to have all of your code available in the public domain for easy access, and you ceratianly don’t want to store all your valuable data (on your users and other important matters) in every user’ browser, where it can be easily deleted, viewed, and compromised.
Yes, when you are ready to run your Node.js application online, you will need a server running Node.js. Heroku offers free Node.js hosting and it is super easy to push your entire Node.js app from your local computer to Heroku server with just a couple git commands, and the entire app will be available online with a URL and hosting for free—until you get a ton of traffic and start using a lot of server resources. Then it gets quite costly 🙂 .
I don’t think I understand this question. Which web stack?
Thanks for the great replies. Some clarifications, and further questions:
1. Regarding the web stack, and expanding on my question about executability: What defines a server computer, as different from the file location where I store the HTML and client-side scripts for the web page?
2. How/where do I get a unique port number? In all of the tutorials we use, they arbitrarily pick 3000 or 4000 or so. What does this mean? Since I’m using the localhost, couldn’t I just pick, say, 5?
3. More specifically into Node: most of the examples of EventEmitters have the same objects emitting and listening to the same event (i.e. someObject.on(‘someEvent’) etc and someObject.emit(‘someEvent’) etc ). Does this make sense? I would have thought the advantage to EventEmitting was that many different objects could listen to the same events, and wouldn’t themselves need to be emitters.
Again, thanks so much for such a great resource. (I’ve attached my embarassing little site – coded a couple of months ago, when I had really NO experience in this. Maybe that will help with context).
All my best
I was inundated the last 2 weeks, and only now I finally have some time again.
Since you have some very thorough Node.js-related questions, you will get much quicker responses and more high quality answers on StackOverflow.
These questions are best for StackOverflow.
Hey there, I’m pretty excited about the copious amount of JS goodness on the site, and the thorough nature of these tutorials.
I’m going through the this step-by-step node guide, currently reading Professional Node.js, but I’m surprised to find a lack of any actual exercises to go along with the material. I’m skeptical that all this reading with no doing will leave me feeling all too capable on the other side. I can certainly do my own experimenting, and will, but I think a guide such as this would be all the more valuable if it directed to some exercises that illustrated the concepts in the chapters.
Just a thought. Thanks!
I have not read this book, but I have read the node beginner book. If you want to get some hands on with node than this is an excellent series: http://dailyjs.com/web-app.html
Right on, I’ll definitely take a look. Thanks!
I agree with Anthony, the web app series on DailyJS is very good. However, I noticed that it does not always explain all the fundamental bits you need to know, so it is best to follow that series after you have at least learned the basics first.
Not to worry, you will have a ton of exercises to do, as you progress through the book and the course outline.
Unbelievably valuable post. Very nice work with this blog. I have read most of Doug Crockfords info and this is right in line with his instructions. Thank you for talking the time to share with folks trying to grasp node.
It would be helpful if you write the Node.js and Mongo.db interaction with examples.
Good point, I will think about doing that.
Help me Richard Bovell: you’re my only hope.
I’m having trouble bootstrapping data on the initial page load.
I have an express server, which renders a page using handlebars, and a mongoose connection to the server. My front-end is written in Backbone, and works great. My collections are able to fetch data from the server fine, which send them back as JSON.
What I’d like to do: on the initial page request, make a brief call to the server and bootstrap 50 model instances onto the initial page. I’ve got it down to this problem: the response.send method in express automatically encodes objects as JSON, while the response.render method doesn’t. And – stupid as this seems – the server is crashing when I call .toJSON() on an array of mongoose model instances.
Any ideas for bootstrapping objects onto the page using mongoose, express and handlebars?
So it appears your trouble is with serializing (converting the data from an object to a JSON string) the results from Mongoose.
If this is correct, then you should use this:
Don’t use this:
Also, and most important, you should ask a question like this on StackOverflow for quick and high quality responses, and you can post your entire code there easily, too. Those guys are super helpful, and you can get an answer within seconds or minutes after you post your questions.
Best of luck.
How do you best load test your application to see how it performs under extreme load?
I have used a few services and open source projects, especially BrowserMob:
LoadImpact is a good service, too, though a bit costly:
Pingback: Node.js tutorials ← Anup Khandelwal
You are the guy!
All of your tutorials are really helpfull, but i really wanted a good guide for learning node… i bought a book called “Building Node applications with backbone and mongodbr”, and even with my previous PHP and MySQL experience, i found it quite hard to understand, because it mixes all 3 in one.. and the book doesn’t really explain all the features it says in the book…
well, do u think that’s a good book for begginers with node and backbone? or i should try your tutorial?
The Node Beginner Book that I recommend in the article above is the best way to get an Introduction to Node.js as an absolute beginner.
i’m just read the beginner book, and i’m reading the professional book, i’m really satisfied with both. 🙂
after i ready those 2, i’ll go back to the nodejs+backbone+mongodb book.
What is up with dot-spacing urls (like translate.google.com, maps.google.com). When and how should this be done. Is there a good post somewhere about it?
I appreciate all the help so far.
Pingback: PAF #1 – Ebooker | Potato Life
This sites looks awesome. Heard about it from listening to Java Posse Podcast and someone mentioned it. I have just gone thru the Node Beginner book online and came into a free copy of the Node Cookbook from Packt, but I think I will follow the path you recommend. Been doing backend stuff for well over 10 years but really want to sharpen my JS skills.
I am very glad to hear, Mike, and good luck learning Node.js. You will be happy you did.
I am also wondering how one would go about learning other web development techonlogies, such as HTML, CSS, and jQuery, because I want to create web apps. I want to create my own blog as my first web project and have heard that Ruby on Rails is also great. Just wanted your input. Thanks for the advice in advance.
And about learning HTML5/CSS3 and Responsive design here:
Great article, funny thing is that I had just opened a tab with the Pedro Teixeira book when I switched to your article and then I see you were recommending it. Plus the table of contents seems very promising. I would say take a look at this too: http://letsnode.com/express-and-knockout-example
with the source code being here: https://github.com/iloire/cachirulovalleydirectory
Seems like a huge project and I plan to check it out once I finish the book.
thank you in advance!
I understand what you mean when you write that you don’t feel like you know enough. I usually have that problem, too. There are people like you and me who prefer to learn everything about a topic before we feel very confident with it, which I must admit is not always the best method for learning.
Indeed, there are many advantages to being this way: you become very knowledgeable and when you start coding, you know exactly what you are doing. But on the other hand, it requires much more time and effort to get rolling when you prefer to learn a lot first.
So, since I usually have this problem, this is what works for me when I feel like I read a bunch and still don’t feel like I know everything: just start building stuff.
You will find that as you build stuff, you will then discover what you really don’t know and you will Google (or search StackOverflow) for help and become more and more familiar with the overall concepts and processes.
There have been some very vibrant discussions about this from various authors and developers, with some making strong arguments for both. The bottom line is that it is much faster for the browser to render client side, so use client-side templates. Not to mention it is much easier to manage all your templates on the frontend.
Another good question. There are times when you need to use one over the other, depending on the particular circumstance. But for the most part, you should go with Backbone Routing. The Node routing is best for serving up static content in your public folder and for serving up private content from the server that you don’t want to keep in the public folder. And of course you can restrict certain URLs to your app as well using Node routing.
For normal application interaction (including simple navigation to different parts of the app), Backbone.js routing should be the choice.
Just start building stuff and when you are stuck, use StackOverflow to help you out. You will learn a lot.
You are an inspiration, Mate. I am confident that within a few months to a year, you will figure out all this stuff and become a very good developer. And you might even come back and provide answers and recommendations to us here, with your new found experience and knowledge 🙂
really helpful advices there, thank you for the motivation!
by the way there is an extra guide part for the wine cellar that you can add to the backbone guide (http://coenraets.org/blog/2012/10/creating-a-rest-api-using-node-js-express-and-mongodb/) he changed the backend to work with node.js and mongoDB, so if you follow the two parts of the his backbone guide and also the backend guide youll end up, with fully single page app using backbone node and mongoDB
Thanks, Boaz. I have to check out that extra guide article from Coenraets.org.
i couldnt noticed Meteor.js, the idea of having the databae in the client i just awesome!
i know your working on a new post for learning meteor.js,
but untill then do you have any recommendation on a certain book? i got the “getting started with meteor.js framework” book but im thinking of buying the “Discover meteor”.
Definitely. In fact, this is a summary of what my article will entail: You should get the Discover Meteor book and watch as many of the screencasts on EventedMind.com.
Then, for more advanced Meteor stuff, like how to really run Meteor in production, this is a great blog:
Thanx for sharing the link, I had so much trouble playing with the dailyjs tutorial which is too outdated.
Thanks for this excellent guide – I’ve eagerly started and just completed the Node Beginner book. It was a great suggestion.
I did run into one problem in the final exercise which I was able to overcome. Anyone who follows the book exactly will run into this problem and I figured they might turn here for help, so I’d like to share my solution, which I’ve posted as an answer on Stackoverflow:
In short, the Formidable module doesn’t seem to populate the files.upload property anymore. Simply changing it to files.file solves the problem.
Thanks much for posting this, Dave. I am sure it will be very helpful to others. And I am glad it worked out for you.
Avast telling that there is malware in this page: superfocus.com
Thanks much for letting me know, Cassio. We will act on it accordingly.
You were absolutely right, Cassio. I notified the host company and there was indeed a malware on one of the files. Thanks very much again for taking the time to bring this to my attention.
Oh yeah, This site is fucking awesome !!!
Thank you for this guide is the best I see in all internet.
I like the enthusiasm, Lio. Thanks and welcome.
In my “off time” I’m reading about my next steps what eventually wil lead to buidling my own start-up 🙂 And now I’m looking into Node.js and Meteor.js.
p.s What do you think about the Node.js course on codeschool?
Thank for all the awesome information! It really helps me a lot!
You should go directly to meteor.js. But if you have a lot of and you want to learn the process throughly, you can learn the Node.js basics, which will allow you to have some idea about Meteor.js. But if you are busy, just learn js then learn Meteor.js.
The Node.js course on CodeSchool is good.
Thanks Richard 🙂 I appreciate it.
I think I will take the node.js course on Codeschool first and then switch to Meteor 🙂 Really exciting.
BTW: there is a MongoDB for node.js developers course starting on: https://education.10gen.com/courses
Thanks for this great tutorial. Do you have any suggestions and best practices for dealing with exceptions that my crash the server like a TypeError?
this site is so helpful to get an idea about node.js for those who just heard the name “node.js”.
thnx Richard Bovell.
Many thanks would not be enough for the work you are doing here. Your articles are great and provide sequential learning experience.
I read your Backbone.js article too and I’m grateful for your efforts.
Keep up the good work!!
“It’s a must visit portal for great learning”.
I am really enjoying your depth of JS tutorial and I am stumbled upon the insight knowledge you share with open world and the steps you teach them the crux of new technologies like Node.js and Backbone.js. I am really impressed. I have also pointed some of your resources for stack over flow references. It shows how much your articles are well articulated and clearly teaches everyone.
keep up your good work.
If you want to obtain much from this article then you
have to apply such strategies to your won web site.
Excellent beat ! I would like to apprentice while you amend
your site, how could i subscribe for a blog
website? The account helped me a acceptable deal.
I had been a little bit acquainted of this your broadcast offered bright clear concept
All your posts are simply amazing, its been a real ‘Happy Learning’.
I just wanted to check on the post related to mongoDb, I was not able to find it.
Kindly share the details of the post.
hello sir i want to learn js concepts completely. can you refer some sites or some books…
Hi my family member! I want to say that this article is awesome, nice written and come with
almost all important infos. I would like to see extra posts like this .
I really like your blog.. very nice colors & theme. Did
you create this website yourself or did you hire someone
to do it for you? Plz reply as I’m looking to design my own blog and would like to
know where u got this from. appreciate it
Pingback: Learn Node.js Completely and with Confidence | ...
All your articles are awesome!!! I was just wanted to mention nodeschool.io and Mixu’s node book (http://book.mixu.net/node/). They have both been valuable resources for me while I’ve been learning node. 🙂
Pingback: How to: How do I get started with Node.js | SevenNet
Pingback: How to: How do I get started with Node.js | Technical information for you
Pingback: 「译」不侧漏精通 Node.js – 千月殿 -
Pingback: Solution: How do I get started with Node.js #dev #it #computers | Good Answer
Pingback: Get Started with Node.js | Muhammad Ejaz Azeem
Pingback: How do I get started with Node.js
Pingback: best nodejs guide for beginners | nodejsbestblog
Pingback: Node.js的学习资源、教程和工具 – DELONG
Pingback: Node.js Useful Links | PHP T!PS & Tricks
Pingback: How To Learn Node.js | Boxing Khmer
Pingback: Everything about Node.js (How-to) | Bhavin Patel
Pingback: Learn Node.js Completely and with Confidence | ...
Pingback: Node JS Tutorials for Beginners | How Why What
Pingback: More resource on learning the Node.js | federerlee
Pingback: Node.js的学习资源、教程和工具 | 41号边界
Could you please update this article,as it has been 4.2 years sincce you wrote this.Please update it with latest process that we can follow to learn node.js properly.
The final app you ask to build is a dead link http://dailyjs.com/web-app.html/. Can you please fix?
Also where is your MongoDB guide you reference throughout your site? I can’t find it.
So three years have passed since the original post, and now there are a lot more Node books on Amazon. Out of curiosity, with the new options available, do you still recommend Pedro Teixera’s book?
How many hours per day needed to complete the course in 3 weeks ?
you misspelled the author’s last name in your #1 suggested book making it hard to find: Professional Node.js by Pedro Teixeira
Pingback: How do I get started with Node.js [closed] - PhotoLens
Pingback: How do I get started with Node.js [closed] – Row Coding
Pingback: Node.js [closed]를 시작하려면 어떻게 해야 하나요? - 다양한 이야기들
Pingback: 我如何开始使用Node.js [关闭] – 源码巴士
Pingback: How do I get started with Node.js [closed]
Pingback: Node.js Tutorials: Tutorials for Programmers of All Levels - Application Performance Monitoring Tools For Developers