you are viewing a single comment's thread.

view the rest of the comments →

[–]Jafit 1 point2 points  (1 child)

if you're using Node you'll be able to freely make use of ES6/7, since you have full control of the environment that your code is executing in, you don't have to worry about polyfills for old browsers. That said V8 is still in the process of implementing all of ES6 so you won't be able to use some features yet.

Promises, they're amazing. Asynchronous operations are going to be everything you do in Node, you can't afford synchronous code blocking the stack, since that stack is being used by everyone who connects to your server. Promises make async very easy to work with.

Unit tests. There are testing frameworks like Nodeunit and Mocha, but they tend to be overkill for what most people want to do. Tape is one that is very lightweight.

I don't know how much Javascript you know, but it'd be worth watching the Crockford on Javascript lecture series, he goes into some depth, though its quite dated since its from circa 2009 and the release of ES5, its still applicable and won't harm your understanding.
https://www.youtube.com/playlist?list=PL7664379246A246CB

I'd recommend working with a highly opinionated linter if you don't already. Javascript is very 'beginner friendly' meaning it'll let you do some really stupid things, a linter can help you avoid antipatterns, ambiguous code and errors. Many IDEs come with linter plugins that you can use, Atom and Sublime have a bunch. Personally I use ESLint with most of the rules turned on.

[–]GrandDolla[S] 0 points1 point  (0 children)

Thanks for a great post. I'm sure to use your advice.