News for hackers. Stuff that matters.
Re:Ask HN: Does Node dominate at new startups? by notduncansmith on Saturday August 02, 2014 @07:56PM (#8126490)
I wish I did. I can say that watching a lot of Rich Hickey's talks and Gary Bernhardt's Destroy All Software screencasts have made me a better programmer in general, and that has carried over into my Node development practices.

Here's a few nuggets that will help you:

- Use promises instead of callbacks, specifically Q. Don't let anyone tell you the performance will hurt you - I guarantee that promise execution time is not your bottleneck.

- Use event listeners for things like kicking off email notifications.

- Use Mandrill for sending those emails.

- Use promises.

- MySQL is still good tech.

- Use Sequelize to make using MySQL/Postgres not hurt.

- Abstract into middleware when you can.

- Bogart > Express.

- Use promises.

- Use dependency injection (Omni-DI is a good library for this).

- Route handlers are for orchestration, not core business operations.

- Avoid for loops. Prefer Array methods like forEach, map, reduce, and filter.

- Use promises.

I plan on doing more writing about this sort of thing when I have time.

There are no comments on this comment yet.