# Intro I'm involved in development of Node.js-based web application. Recently I thought to myself -- if I would have time machine, what would I say to my earlier self? Which big things I would like me to know better? # Go for Node.js Go for Node.js from the beginning, it is real and can handle real users, it is not a geek toy any more. it is fast, it is fun, it is production ready However, be ready for discouraging lack of tools and libraries # ...what does it mean exactly? Packaging. Commv on.js. NPM. Browserify. Embrace Node ways broserify is closest to silver bullet we can get. right now It is a good foundation for code sharing (it is all drills down to packaging and dependencies. Require is here to stay). Stay away from Require.js (enabling no-module, not obvious, shims and stuff, problematic, no Node.js compatibility). # Isomorphic Javascript (Nodejitsu guys coined that. It is doable. Not easy.) # Share models (SDK for free) views and controllers will follow (if you will solve router, jQuery and tons of other stuff) # Share templates Start using Handlebars or similar. Less helpers. Simple JSON. # State Concurrency in single-thread introduce problems. Avoid it if you can. # Just bullet points Grunt, winston, forever, cluster, no new relic Feature flags and a/b testing, trackers ...but don't use eventing. Yet. Isomorphic Javascript is possible, but not that easy (at least we have a fancy word now) Models # Share models first, views and controllers sharing is not that simple to figure out some models code here.... # Common.js # Use Handlebars or similar client/server compatible solution Concurrency in single-thread introduce problems # Solve state/context problems ...Avoid if you can (same app for all users) # Use Grunt and NPM # Don't touch require.js, it is too enabling and not enough (computed dependencies) Production # Forever, clusters, no big deal App # Use decent logger (Winston) and some configuration framework (and keep configuration explicit) # New Relic -- stay away # Design for feature flags and A/B testing from the beginning # User tracking is a big thing and shouldn't be ignored.