Or even javascript and C: http://jsish.sourceforge.net/
Duktape is along a similar line: http://duktape.org/
This is a discussion about platforms that would buckle under the bulk of a micro-OS and a JS interpreter/VM stack. And that's not even handling the issue that most of these devices use embedded hardware platforms that you need to access with specific assembler calls - how would you do that in JS or Python!?
There are a few JavaScript interpreters that use very minimal resources and have access to all the necessary hardware (wifi, BLE, SPI, UART, i2c, etc), these are Duktape http://duktape.org/, Espruino https://github.com/espruino/Es..., JerryScript https://github.com/jerryscript..., and more. These are all designed for IoT devices. For performance this is an interesting read: https://www.espruino.com/Perfo...
Good point. The reason I like to use JS everywhere is that I only need to learn one language. And it means I can learn it really well. Until I did full-stack JavaScript I had only done front-end JS and it was pretty wonky. Using Node.js means that you need to learn some of the great parts of JS well (closures, async, etc). This drastically improved my front-end JS. If you used the LAMP method for full stack development, you would need to learn Apache config (although once it's running it's okay), PHP, JavaScript and SQL, and I would not have the time to learn the subtleties of each language.
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:
- Callbacks
- Closures
- 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.
"Gotcha, you snot-necked weenies!" -- Post Bros. Comics