6 ms·
I’m constantly surprised by the ubiquity of javascript. Of all the languages I would choose for a desktop app, it ranks pretty far down, yet I am clearly in th
by jojohohanon 4y ago
I’m constantly surprised by the ubiquity of javascript.
Of all the languages I would choose for a desktop app, it ranks pretty far down, yet I am clearly in the minority.
But I’m not here to show my age or biases - I am genuinely curious. What am I missing that makes JS/node (or is that a redundancy? Is there any other choice than node for JS local development?) such an attractive choice for local development.
Over say java / swift / rust for static languages or python / closure / julia for dynamic?
- cellularmitosis 4y agoMost likely it is simply the fact that they use it for their day job. Tackling a tough new project from scratch is already mentally taxing, doing it in an unfamiliar lang doubly so.
- izackp 4y agoI too have the same sentiment. I realize though there are not many frameworks for cross platform development. If you do want a native language you'll probably have to use QT. There are more out there, but most are based on native widgets which have their own unique behavior which makes them difficult to abstract. It seems to me that these electron web apps provide this 'leak free' abstraction.
- metalspot 4y agoi have used nodejs for all of my personal projects for years (almost 10?) now. my reasons are: * JS has the largest developer and runtime install base * JS is very competitive with Go/Java on performance and the runtime (v8) actually improves on cpu/memory performance over time * you get a UI that supports everything on all major platforms (the browser) for free * the apps i write are generally IO heavy and so the async event driven model is very useful to have as a 1st class feature * starting with an async event driven language/runtime makes it very easy to decompose your app if you want to split something out into a separate service * i know js, and work with it professionally already, and it has a large market for professional dev work, so everything i learn in my personal projects increases my value as a professional
- Slackwise 4y agoUsing JS/Node and React/Native, you can target absolutely every platform with a unified codebase. There's essentially no technical debt in choosing these technologies because if you start with a web app and then want to make a "desktop app", there's Electron. Want to make a mobile app? React Native. There's even React Native for Windows and macOS for a more true desktop app with a native UI. You can also run your JS on the backend with Node, and even inside the database (PL-V8 runs V8 for stored procedures inside PostgreSQL, aside from obviously CouchDB or MongoDB and others). Heck, you can even write an app for the Xbox or build out on several IOT platforms using JavaScript! Is there any reason to create the same thing in 4+ different languages? Are you going to rewrite your frontend in C#, Kotlin, and Swift? Are you going to deal with different language models and incompatibilities? Rewriting the same exact functions over and over, and unit tests for every single one, keeping in mind the subtle semantic/scope differences between each language--and then realize you still have to serialize/deserialize to JSON to talk to your backend and other services and just juggle JS data models between all these languages and ecosystems. Choosing JavaScript and React today are the sensible default where you won't code yourself into a corner, is what I'm getting at. And you can also now choose TypeScript or ClojureScript in all such cases as well.