Renasar Started Python, C# We knew it, was fast Web-service with different focus - started into Angular, hosting on Heroku Wow, we really get stuff done fast! Changed product direction in May, moved to NodeJS
Dipping a toe Yeah, weekend project turned all out effort Full transfer for major code in June (mostly from C#) No deep team experience in NodeJS, just moved quickly What we are building is very asynchronous network oriented
The Obvious Things Prototype inheritance Javascript, The Good Parts Where’s my damn list comprehensions!?!? Thank god for underscore, lodash Dynamic language vs. static compiled languages testing as a priority, assert-plus Functional scope vs. Object scope
The Subtle Things All the calls are asynchronous. No, Really! Nested callback hell to guarantee sequencing Promises! there’s SO many to choose from - we use Q Hierarchical module imports in NodeJS
rewrite lots of constructors to pass in more and more things configuration, logging, etc… Finally - di.js What’s the scope for that function? Rewriting to be able to test functions otherwise hidden via scoping
NodeJS is young… Caveat Emptor on libraries! Greater variability than I expected from other languages Don’t like that way of doing it? That’s ok, probably have of JS developers don’t either and made another way of doing it Node.js, IO.js
WTFBBQ?!?! DHCP server - listens on raw socket for broadcasts NodeJS doesn’t appear to support the full raw socket API - can’t bind to a specific interface, end up having to bind to 0.0.0.0 to get it to work Corner case for most, but surprised the hell out of us! To-do on our list to patch or expose and submit upstream
Testing Started with Jasmine, switched to Mocha Chai, Sinon, chai-as-promised, sinon-as-promised Mockery, istanbul JSDoc, APIdoc memwatch, strongloop, statsd
Refinement Mongoose -> Waterline Validation and CRUD lifecycle migrations, adapters to different backends API management Swagger: JSON-Schema ++ for APIs Multi-language library support
Releasing NPM is great, but multi-repo can be a pain Debian and RPM packaging dependency management in packages is ugly Deploying updates Linux OS conventions for hosting NodeJS
6 months, code in the wild Damn, we get a lot of stuff done quickly! Asynchronous has been beautiful, if occasionally painful Reaping the scaling, multi-protocol benefits Q/Promises making a huge difference Peer review and tools to suggest critical issues