Just picking up node. Should I use express or really learn node first?
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.
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!)
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.
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
链接地址: http://www.djcxy.com/p/52676.html