Node.js Step by Step: Blogging Application
Tutorial Details
- Topic: Node.js
- Format: Screencast
- Difficulty: Moderate
In the previous episode in this session, you were introduced to Node.js by creating a simple web server that displayed the obligatory “Hello world” text. Today, we’ll take our knowledge to the next level as we begin the implementation of our blog engine application.
During the course of this, episode we’ll be adding our very first route and view. To do this, we’ll learn a little more about Node’s predilection for asynchronous behavior, and we’ll also take a look at the File System (‘fs’) module for reading our first view into our application. By the end of this portion of our series, you’ll have a little better understanding of Node and of one of its libraries that makes it possible to use Node for scripting.

Thanks! love your’s tuts.
Btw, there seems to be no a good mvc framework based on node equiparable to rails, zend django.. ? right? or maybe express is good enought? (i’m using codeigniter, not complete like zend but good enougth, is express equiparable?)
Express is like Sinatra from Ruby.
Look at the available frameworks here: https://github.com/joyent/node/wiki/Modules#web-frameworks-full
You could try PieJS, seems like what you want.
Glad you like the tut.
If you’re looking for a Rails like framework for Node.js you may want to give geddy a try (http://geddyjs.org/). I haven’t played around with it yet, but it bills itself as an MVC based framework in the same vein of Django, Rails, etc. That said, I do believe that Express is by far the most popular framework for node right now and since I am more of a fan of Sinatra than I am Rails, I kind of lean towards it as well.
Give both a try and see which one you prefer.
Great Tut! really good pacing and explanation. One suggestion for future tutorials would be to purposefully make a mistake and then show how the debugging process works in node. Thanks and can’t wait for the upcoming screencasts!
Thanks Paul for the kind words and the suggestion, as a matter of fact, I already have some plans to do an episode on debugging a little later on in the series. Due to the asynchronous nature of node, debugging has some issues that are currently being actively worked on. That said, there are tools to make it easier and one in particular that I plan on covering in a later episode, so stay tuned.
Fantastic series so far!
I really like the progression you have chosen to use for this series. After attempting to work with express for a little while, it’s great to see how this works behind the scenes. I think it’s better to start like this and slowly move through node until full understanding is reached – and then move on to abstraction libraries like express. Also, great idea to use a blog engine for a sample app, that’s exactly what I want! xD
Awesome!
Im justing wondering how html templates works with node.js.
=D
Just wait, in the next episode we’ll cover one of the templating modules available to node.
I’m definitely waiting for that one.
Very well presented. I’m eager to see the next episode.
Nice tut, loved it!
Also requesting a tutorial/article on “advance jQuery animations”!
Cool Thanks !
Congrats on the tutorial but when can we see an intro to Express, the web framework for Node.js
The plan is to progress from bare bones basic node to using the Express framework for our blog engine. So, you will be seeing the framework used a little later on in this series. That said, a deeper dive into the Express framework would probably be a good subject for another set of screencasts; I’ll keep it in mind :-)
the Blip.tv url in this line
“Subscribe to our YouTube and Blip.tv channels to watch more screencasts. ”
seems not coreect.
Lovely stuff Christopher. You’re video tutorials are really nice, clear and consise. Looking forward to the rest of the session!
Amazing Episode, Makes me think about hacking something like `Node.js on Rails` ya dig? haha ! Node.js is so cool man and you’re making it look simple !
already waiting for the next episode
I really like the flow of these tutorials…very well done…would like to see a chat server example instead of a blogging one…but that’s just me! Looking forward to the next one.
I just wanted to say thanks to everyone for all their really nice and encouraging comments so far. I’m really overwhelmed by the positive feedback that I’ve been getting and I’m really looking forward to getting the rest of this series out there for you all to see. I hope everyone continues to watch and enjoy the rest of the episodes. Also, please keep the suggestions coming, I may not be able to cover every suggestion in this series, but I am also looking for interesting topics for future tutorials as well.
Hi Christopher,
thank you for this great screencast, you really set the level. If you are looking for topic suggestion I got one: cover in this (or another) series database connection/storing/reading. Many “blog like” tutorials about Node.js use files for storing user content. I think it would be a kickass thing if you show in screencasts how to comunicate with some modern NoSQL database (CouchDB or Redis would be nice) with raw JS (or some very low level library).
Once again, thanks for thit tut/series.
MongoDB … is preferred.
Really love these tutorials, just the right amount of information per video, and the right speed with which new concepts are introduced. I really hope you continue with this.
Great tutorial. Can’t wait for the next video! One thing though, I would write DRY code from the start.
im really love these tutorials!!! thanks!
great video on node.js :)
Excellent, informative video. Looking forward to the code refactor/cleanup in the next vids ;)
Keep ‘em coming
Great tutorials! Thanks, Christopher. Keep going your greab job! Node rocks.
Suggestion: a Clojure programming series would be very very interesting too. Clojure is a wonderful programming langage which should deserve some sweet screencasts.
Hi Christopher
I can but echo all the comments above. Superb tutorials. I too would love to see an episode on Node.js and CouchDB working together. Thanks again for your great work.
Quality tutorial, busting for next episode!!
Love this series – hoping that part 3 will be ready soon.
Very helpful and clear tutorials, Thank you very much Christopher!
I’m very interested to see how Express can be utilized with node.js. Also, one suggestion is that it would be very helpful if you can create a tutorial for integrating node.js and Express with ‘MongoDB’ as it has been becoming very popular and demanding recently. Looking forward to see your new series! Many Thanks.
Hi Saman,
As I mentioned in my reply to Sirwan below, I intend to take this series all the way to the point where we are using Express and MondoDB. So, keep on the lookout for the next episode, which should be right around the corner, and we’ll get there soon.
Christopher
Thanks very much for the tutorial Chris, the pace of it was perfect, and so my input would be a request for a tutorial on NodeJS, Express & MongoDB …. I think this would be the next popular thing in the NodeJS circle. …. express & mongodb.
thanks,
sirwan.
Hi Sirwan,
Wow, it’s almost like you’re reading my mind. My original intent for this series was to take you, the viewer, from very humble beginnings, to practically coding up your own web framework, to finally finishing up the full app using Express and MongoDB. If you’ve ever read the Django Book, you’ll know exactly what my intent is. I basically want to show you at least one way that you could do things yourself with nothing more than NodeJS and then how to go about using all the tools available to you. That way you have a deeper understanding of all the tools you’re using. So, stay tuned, and we’ll reach the point you speak of soon enough.
Christopher
Whens the next tutorial?, still busting!
Are you still going to make more tutorials on nodes??
Hey guys,
Thanks once again for all your great comments, they are all very, very encouraging. I just wanted to post a quick comment to everyone to let you all know that, yes indeed, I am still working on several more episodes in this series and that I should be finishing up the next one in the series very soon. I have a rather big (and good) change happening in my life right now that has thrown a bit of a delay on the latest episode, but I’ll be back again with the next one shortly. So, keep your eyes peeled and thanks again for all of your kind words.
Christopher
Hi Chris. Thanks for the tutorial. Can you tell when you expect to release the next one! :)
Hi, great tutorial, but it’s been almost half a year since your last comment… It seems there is not going to be more episodes, which would be a shame… both of your tutorials are the best I have seen about node.js
Great tutorials Chris. Thanks for doing them!
Great tutorials, Chris! Can’t wait for the next one!
What’s the name of the color theme you were using in emacs? I like it a lot. Thanks.
Good video. Before you get too far into the weeds of web development though, it would be really nice to see a discussion on the high level architecture of node and other asynchronous event driven web servers and why they perform so well using just one thread. I still don’t understand what makes them different/better/worse than the thread-per-request model of other servers.
Hey Christopher, it would be awesome if you could include the written tutorials (so we can check them out later if we want to quickly find something).
alessioalex, I’ve posted the markdown for both of the current tutorials on my github account and I’ll continue to post the markdown for each script there. Also, I have the code for the tutorials on my github site as well. See the links below to find what you’re looking for.
https://github.com/croach/nodejs-step-by-step-scripts
https://github.com/croach/Node.js-Blog-Engine
This is a great series. Do you have a timeline for when the next episode will be released?
Hi Tim,
Sorry it’s taken so long, but I’m putting the finishing touches on the third episode in the series now and I hope to have it released by the end of the month.
Christopher
I would love to know where/when the next one is/will be too? What a great teacher … more please!
Thanks for the kind words Matthew, I really appreciate it. As for your question, as I mentioned to Tim above, I’m putting the finishing touches on it now and I hope to have it out by the end of this month.
Christopher
Nice post man!!!
I did some posts about Node.js on my blog too
There are posts about, Node.js, Node.js with MongoDB, Simple Chat with Node.js and NPM (Node Package Manager).
Take a look on my blog: http://udgwebdev.wordpress.com
Well done screencast. Will this session continue?
And… would you mind posting on YouTube instead/along of nettuts? It’s a pain switching fullscreen/back to editor again and again. but it was very nice watching and following, thank you for that :)
Just correcting my link recently I’ve changed my blog address to http://www.udgwebdev.com there are many posts about Node.js too it’s a good reference!
Hey Christopher,
Just to say – thanks! I’ve been looking for something exactly like this for a while. Just getting into Javascript, and this is perfect. Eagerly awaiting the next one.
James
Thanks Christopher for the Tut and I cannot wait for the end of March for the continuation. You are quite knowledgeable
Hi Christopher,
I finally got round to going through this episode of your series. It has been extremely useful in grounding my learning of NodeJS. Thank you!
Would you be able to shed any light on the appearance of the new episode?
All the best,
Phil
Hi Phil,
I’m happy to hear that you’re enjoying the series so far. As for an update on the next episode in the series… Well, I’m putting the finishing touches on that one right now. I had hoped to finish it up by the end of March, but I was really trying to fit too much into a single episode. I decided to start over, scale back a bit, and do it right. So far, I’m really happy with the rewrite and I hope you all will be as well.
Thanks again for your kind words, and keep checking back, it should be done very soon.
Christopher
Where’s the next episode… :-(
I guess its almost a year by now since you posted the last video.
When can we expect the next one?
Thanks! These two tutorials have been the best so far for node and really explaining how things work together. I hope you get a chance to finish the next ones soon!