34

As the title stated, I'm just now picking up node. I've looked into Express a little, mostly by watching the videos on expressjs.com, and was pretty impressed.

However, it reminded me a lot of Rails. I always felt like I never really understood what was going on when I worked with RoR. It incorporated so much magic that it really made me unconfident and pushed me away. I don't need to get down to bare metal but I like to have a good sense of how/why things work they way the do.

It's possible just my ignorance of Jade and Sass made the Express videos look like wizardry.

Possibly pertinent: I've worked with JavaScript and some libraries (jQuery, Dojo, Raphaeljs, ESRI) for a few years now so I'm not completely js uninitiated.

MPelletier
  • 16,256
  • 15
  • 86
  • 137
Chris Cummings
  • 2,007
  • 5
  • 25
  • 39
  • The source code for express is only a couple thousand lines. Reading through the source of express wouldn't be a bad place to start. – generalhenry May 18 '11 at 05:16
  • 1
    @generalhenry probably best to read connect first though. – Raynos May 18 '11 at 08:08
  • @ChrisCummings.. hmmm.. thanks for posting this.. I thought I was the only one that felt 'unconfident' when there's this black box in front of me without me knowing what exactly was going on... – Jan Carlo Viray Oct 05 '12 at 19:39

3 Answers3

28

I don't need to get down to bare metal but I like to have a good sense of how/why things work they way the do.

Node.js on its own is quite low level. I do recommend you spend a day playing around with the http module on its own before moving onto connect.

Express builds on top of connect so if you spend a few days playing around with connect and then "upgrade" to express you can start using express without feeling like it's doing all kinds of magic.

All express will offer you from there onwards a nice routing API and a view engine.

Possibly pertinent: I've worked with JavaScript and some libraries (jQuery, Dojo, Raphaeljs, ESRI) for a few years now so I'm not completely js uninitiated.

It's important to come into node with strong JavaScript skills because it makes the learning curve a lot more manageable. The important thing to learn is the asynchronous style of programming (and not making a mess of you code!)

Tomasz Gawel
  • 8,379
  • 4
  • 36
  • 61
Raynos
  • 166,823
  • 56
  • 351
  • 396
  • Seems like pretty sound advice. I'll do just that. Thanks. – Chris Cummings May 19 '11 at 02:59
  • 2
    @j33r you may also want to sit down and write proof of concepts (demo) frameworks for routing, templating, views, middleware, ajax, communication, etc. in node.js just to bolster your understanding of how it works at a lower level. I recently wrote a proof of concepts ajax long polling snippet, which helped my understanding. – Raynos May 19 '11 at 08:16
  • Not to scare you or anything, but I would also look into single page applications on the front end, which really take advantage of Node/Express.. My personal recommendation is to look at AngularJS. I'm in a situation in which I've worked with AngularJS in a bit over a year now, but have been coding my backends with good ol'fashioned PHP. Because your website on the server side is only a Restful JSON Api, it's much much easier and faster to use Node, instead of PHP. – Spock Jun 23 '14 at 01:01
11

I would say it's definitely worth learning node.js first. I'm learning myself and just went through this tutorial and found it very helpful...

http://nodebeginner.org

This video tutorial was pretty helpful also.

Right now I'm going through this book: Hands-On Node.js (via the PC Kindle app).

More resources in this topic.

Community
  • 1
  • 1
wdm
  • 7,121
  • 1
  • 27
  • 29
5

I suggest to read how-to sites and demos collection: http://howtonode.org/ https://github.com/straps/nodejs-demos

There are also very good slides from JsConf conference with some nodejs examples, you can find list of slides here: https://gist.github.com/960104

Andrey Sidorov
  • 24,905
  • 4
  • 62
  • 75