I agree that the object model and patterns for MongoDB are different, the object mode and patterns for front-end and back-end are very similar in many cases, there is a big overlap. Things you use on all three are:
- Prototypical inheritance (front-end and back-end)
- Event emitters (front-end and back-end)
- And many more like described here: https://www.smashingmagazine.c...
Code re-usability is useful at times, I was able to write a library (https://github.com/psiphi75/web-remote-control) that was used on the server, on the front-end and on an embedded device and I guess around 80% of the code is shared across all three. Imagine writing and debugging that code in three different languages.
I dove straight into Node.js to develop a platform around 3 years, I don't regret using Node.js, in fact I am glad that I used it. I essentially used the MEAN stack (MongoDB, Express, Angular and Node.js). It was great to:
1) use JS everywhere: back-end (including the DB) and front-end.
2) use JS: it's fun (for me) - if you use the right parts. And it performs fast enough, on par with PHP, if not faster.
3) have an experienced community - JS and Node.js has gone through it's teething issues already.
4) do async programming - if you do it right, you tend to keep your code more modular.
What was painful:
1) Learning to write JS the "right way" and how to avoid the bad and ugly parts.
2) At the time there was no great CMS, I believe Keystone is the best at the moment, but it looks very light when compared to Wordpress.
What you need to do if you go with Node.js:
1) Learn JS well, learn "The Good, The Bad and The Ugly", such that you can avoid the Bad and Ugly. The good is actually awesome.
2) Understand prototypical inheritance, it's not your classical classes, but it a powerful and memory efficient way create objects.
3) Use a linter to write your code, like eslint, it will help you avoid the bad and ugly parts.
I still use Node.js today, but now for the Internet of Things and my embedded device runs Node.js. JS is everywhere and it's going to remain everywhere.
Taking the numbers at face value you get the following stats:
- with 4000 developers
- 2.7 lines of code added per day per developer
- 1.3 lines of code removed per day per developer
- 0.47 lines of code changed per day per developer
Thanks for pointing out the typos. My spelin is bahd at the best of tymes.
Not only that, the disc pads on a vehicle are very small compared with the fuel burned. Imagine a 0.1kg brake pad that lasts 200,000km verses 160'000 Litres of fuel burned over the same distance.
Electric and hybrid cars use regenerative breaking, such that when the driver brakes lightly the car will use the electric motor as a generator and recharge the battery, hence the braking emissions would be largely reduced. Heavy breaking will use the disc brakes as well as regenerative braking at the same time, so there will be some emissions then, but still less than classical vehicles.
Elegance and truth are inversely related. -- Becker's Razor