10

My main question is whether it makes sense to begin with node.js as a complete server-side newb. Is JS/node.js a good choice to start server-side web-programming from scratch?

I do lots of frontend work, namely HTML, CSS and basic JS. I even wanted to start with Rails but always had the feeling that not knowing what is going on behind the curtains makes me completely uncertain about the framework - it was just too much "convention over configuration".

My hope is to learn JS in general and dive into node.js right after that. I don't know, however, if this is a good approach for a person without any server-side experience. When looking at existing node.js topics and discussions, the used terminology seems to require lots of knowledge about how servers work in general.

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
aydio
  • 346
  • 1
  • 5
  • 15
  • 3
    You might want to have a look at "express", a node.js framework for creating webservers that many people use. – thejh Oct 30 '11 at 19:23
  • 2
    You may want to learn HTTP and then play around with the HTTP server in node. – Raynos Oct 30 '11 at 19:24
  • 2
    If you are doing web programming you will install a package such as Express.js. You won't be using node directly much, if at all. Still learn everything you can. – Ray Toal Oct 30 '11 at 19:24
  • So you say with express.js, I'll be able to start with server-side JS without overwhelming prerequisites? I'll look into it. Thanks! – aydio Oct 30 '11 at 19:43
  • Hell yes! I did, and I'm lovin' it. Node.js was my first real dive into backend code, and it's been really great. There's an awesome set of express.js tutorials on YouTube. There's a vast community of awesome people working on it. It's JavaScript, which rocks, and don't be scared of things like jade or stylus, they're really great once you get used to them. I just noticed it's been two years, how's it comin' along? – Costa Michailidis Apr 17 '13 at 05:30

1 Answers1

22

Have no fear. Programming is all about practice and you will do mistake while writing code. But, that is how we all have learnt. Whether it is Ruby, Javascript (via Node.js), or any other language: certain aspects of programming are common and you will get familiar with things specific to that particular language over time. Being not able to remember a syntax or convention is OK. Just have reference material on your side. In fact it is encouraged to tinker and experience "let's see what happens ?" moments. This is how you learn, IMHO.

Node.js is indeed a great choice to start learning server side web development. No doubt about that. You don't have to learn Javascript first and then start learning node. Here you can find all the resources you may want. Also, have a look at this How do I get started with Node.js

Here is what I would recommend as your learning path. This is not even node.js 101. But, it will be a great start.

  • Hello World on console. Dead simple and lot of fun
  • Math Addition. ( Nothing to do with server development, can skip, but good if you learn it ! )
    • Addition of hard coded inputs.
    • Addition where function add(a,b) is written in another .js file. Boy, now you are creating libraries !
    • Math addition where input is provided using command line. TIP: Use https://github.com/substack/node-optimist
  • Hello World on web page.
    • Hello World for web but without express.js to start with. Here is the code - http://nodejs.org/
    • Hello World for web with http://expressjs.com/.
    • Adding some dynamism to the response. e.g Saying what time of day it is.
    • Responding based on the URL paths and query string.
    • Serving static files such as images and css.

After completing this many tasks you will be good enough to decide what next you want to do.

Community
  • 1
  • 1
Samyak Bhuta
  • 1,256
  • 7
  • 20