Thoughts on Node
Understanding this is essential, but the intention of this post is not here to talk about how exactly Node works and what apps run best on single threaded, non-blocking I/O supporting tens of thousands of concurrent connections.
So, the future of Node is still bright and I’d like to see more adoption in business and enterprise in 2016. Node already has given businesses a great amount of leverage, besides just lowering costs. Now business can:
- Retain staff for longer periods with happier developers
- Happy developers push great things and in turn customers are happy
- Reduce the number of servers
- Reduce developers and use 1/2 the number of developers to develop cutting edge products
I mentioned that there is no silver bullet with any framework, and Node isn’t an exception. From a personal perspective I don’t like Node because of the following:
- Awkward programming styles using callbacks - with ES6 we will see a more fluent way to write Node applications
- Blocking operations are the root of all evil, and 99% of Node misues come as a direct consequence
- Node has baggage:
- it’s tightly tied to V8, a single JS engine and makes it hard to compare engines outside the browser
- it adds globals to your script: exports, require, module
- working with relational data is still immature in Node - when comparing Node & Express to Ruby on Rails it’s easy to see why you’d choose the latter
Things I simply love about Node which are appealing to me and probably the rest of the community:
- NPM and the ability for developers to micro-control their architecture
- Express, Connect, Socket.io. Mongo, Underscore, Lodash et al
- Single Responsibilty Principle
- Silos that exist between backend and frontend developers are now broken down
- Efficiency and developer productivity see an increase, and with that companies can lower costs
To play the devil’s advocate I’d like to have a swappable JS engine where the developer can have the benefit of having multiple competing implementations and is able to choose one. However right now Node core is too tighly coupled with V8 and would need a complete overhaul.
It will be interesting for us to see how Node evolves as the standardization of ES6 comes to fruition. Currently, Node supports a number of new language features from the ECMAScript6 specification which gives developers a good look at the future of the language.