5 ms·
We live in a world where everyone wants to make Electron apps instead of doing anything in a compiled language or anything other than JavaScript really. Maybe
by PerryCox 9y ago
We live in a world where everyone wants to make Electron apps instead of doing anything in a compiled language or anything other than JavaScript really.
Maybe it's because I've never been a webdev but I just don't understand the fascination with JavaScript. Personally I hate JavaScript any time I have to code in it. Give me literally any other language.
- bpicolo 9y agoElectron isn't great just because it runs javascript, it's great because you get to use the HTML/CSS you're used to making pretty UIs with to make pretty desktop UIs. HTML/CSS have their warts, but they're a fantastically efficient way to build out UIs.
- megaman22 9y agoSo instead of running WinForms or Qt or GTK or, god help us, Swing, components in a tight, snappy desktop app, we're mostly running Bootstrap components in a webview. Six of one, half-dozen of the other, in my book. The Stockholm syndrome around using browser technology everywhere, just because you've been brutalized into learning its wrinkles to work on the web, is scary.
- greggman 9y agohaving built both native and electron my experience is it's an order of magnitude faster to use electron to ship on win/Mac/Linux than any native tech clone this repo, follow steps at bottom of readme, ship on 3 platforms https://github.com/greggman/electron-hello-world https://github.com/greggman/electron-hello-world
- jarjoura 9y agoEvery single platform has their 1-line hello world example. iOS has storyboards, Windows has XAML, Linux has QT components. If all you need is an action button to trigger some underlying code, then those hello-world products are very simple. Electron is NOT that easy to use of a platform. In fact, it's quite technical and requires a lot of knowledge about node and HTML/CSS. It requires that the developer understand you're running a node process that feeds its results to a browser that has a native chrome. Visual Studio Code and Slack for example have native plugins that light-up the various platform's features. So you're never completely guarded from having to write native code. At the end of the day it's just another UI toolkit and language choice you can make when building out your software.
- bpicolo 9y ago> it's quite technical and requires a lot of knowledge about node and HTML/CSS HTML/CSS are already something with massive widespread know-how and insane numbers of online resources. That's a huge deal. This takes every web developer and makes them a cross-platform desktop app developer with no additional learning.
- jarjoura 9y agoTo a point that is correct. For simple button actions that trigger a web request and display content, I would agree the knowledge is there and available. For any deeper skillset, photo manipulation, live camera, geospatial or map related code, webgl, etc. Solutions in those spaces are just as undocumented on any platform and require a sophisticated developer to write complex code to solve. A developer with the caliber required to solve those problems will be comfortable in any language they are asked to write in.
- cageface 9y agoEvery single platform has their 1-line hello world example. iOS has storyboards, Windows has XAML, Linux has QT components. The point is that Electron is cross platform. Building three different native apps with completely different UI toolkits is a huge amount of work and depends on much less common skillsets.
- lcfcjs2 9y agoKeep on coding in Java then old man. I'd like to see your AWS EC2 bill for running a 64gb RAM instance to keep your legacy app running (if you even are a developer, which is not likely).
- olalonde 9y ago> Maybe it's because I've never been a webdev but I just don't understand the fascination with JavaScript. 1) It's the only true "write once, run everywhere" language out there (along with languages that transpile to JS). 2) npm 3) Asynchronous I/O
- dullgiulio 9y agoJavascript "fame" came before npm/Node.js and before it had any idea async/await would ever be implemented. Simply put, Javascript is the only language in the browser.
- austincheney 9y agoYes, but not much before. It took heavy evangelism and Google Chrome's JIT to make JavaScript popular about 10 years ago.
- dullgiulio 9y agoMaybe you don't remember the early 2000s when people were adding flying butterflies around the cursor with Javascript? Recently there has been hype and explosion but web development (development on the browser, which means Javascript for lack of alternatives) had a long way coming.
- crandycodes 9y agoAsynchronous I/O refers to the fact that all I/O interactions default to being asynchronous in JS, not the fancy new `await` keyword, which is nice, but just sugar around Promises. The result of this default is that makes a best practice into a feature, not something I have to manage as a developer.
- goatlover 9y agoBecause of Node or the browser's event loop? It's not like JS was the first language to have a built-in event loop. Visual Basic did exist.
- tfmatt 9y agoThe tooling in my opinion is much better and the barrier of entry is much lower. How many people have been deterred from writing Java because of eclipse configuration? Setting up a remote webserver, launching an app with debug parameters, install eclipsing, setting up a new project and connecting to the remote app. With client side JavaScript (my specialty) the debugger is built right into the browser, hit F12 and you are debugging. The barrier to entry for developing a UI in JavaScript is extremely low. Mocking out JSON data, and running a simple python server to test a couple ideas takes minutes. Try that with JSP, JSF, JSTL, PrimeFrames etc. See you in a week.
- JustSomeNobody 9y ago> How many people have been deterred from writing Java because of eclipse configuration? And yet, this hypothetical person wants to write an Electron app to run on desktops? I don't get this argument. If you are good enough to understand how to write and deploy an Electron app, you should certainly be able to understand Eclipse. Note: I'm not advocating for Java here...
- murukesh_s 9y agoThat was probably a bad argument, setting up eclipse shouldn't be tougher than setting up tooling for modern SPA frameworks like react or vue.. But Electron is a there for a different reason. I can convert my SPA to a working desktop app with minimal coding (same Css/js front end/ja backend, if you use nodeJs). And even it works for all major platforms. So I literally have one codebase for web and all three desktop platforms.. beat that! I know it's not optimal to have everyone open a chromium instance under the hood but how bad is it from JVM?
- pjmlp 9y agoMuch worse, it consumes more RAM, executes slower and lacks the platform integration even what Swing is capable of, reducing the UI/UX to the minimum denominator of HTML5 / CSS3 capabilities. And with Java, I have the option to have an actual binary, 100% native code, if I feel inclined to do so. Something that many Java haters keep being unaware of.
- pbreit 9y agoSurely you understand the value of a JavaScript runtime in every browser?
- pjmlp 9y agoTo make Ads and track user behavior?
- tynorf 9y ago> Give me literally any other language. I'm torn between JS and PHP for the language I have the least fun programming in.
- noir_lord 9y agoSystem at work is written in terrible terrible php, over the last few years PHP has come a long way, many of it's programmers haven't alas
- wruza 9y agoThat’s exactly my experience too. I’m attributing this to “the web curse”. Anything touched by the web is cursed with... I can’t even formulate it in few words, should be complex ancient magic.
- greggman 9y agoI programmed assembly then C then C++ through the the 80s, 90s and 2000s. I love JavsScript. It just so damn easy. No fighting with headers, include paths, linker options, make files , cmake files, scons files, etc. No cross platform bs. When I want to share I just send a link. Electron does have a few platform issues to build the app but they're most solved for me. I get formatting, styles, animation, for free. I get cross platform graphics, video, and audio for free, networking is trivial. I also get pretty amazing debugging tools. iteration time is orders of magnitude faster than any C/C++ project I've ever worked on. I hated JavaScript at first because I didn't understand it. It took about 2 year to stop trying to turn in back into C++. It didn't help that my first real intro was in an environment that used Google Closure and the closure compiler both of which were designed by Java programmers to try to treat JavaScript as Java and disallowed real JavaScript. now I mostly loath going back to C++ and having to fight the dev tools on each platform which seem to change every 5 years such that all old samples fail. is it JS perfect? no, i think I kind of miss static typing but not always. It's often a joy to just do it.
- megaman22 9y ago> No fighting with headers, include paths, linker options, make files , cmake files, scons files, etc Instead you get to fight with often poorly-versioned bower/npm dependency hell, and gulp/grunt/webpack config errors with inscrutable messages. > having to fight the dev tools on each platform which seem to change every 5 years such that all old samples fail. Such stability! If anything in javascript still works five months later, I count my lucky stars.
- jeeberz 9y agoI hear you but since I've been using yarn to lock all package versions I haven't had any issues. https://yarnpkg.com/lang/en/docs/yarn-lock/ https://yarnpkg.com/lang/en/docs/yarn-lock/ JS development without yarn is complete madness.
- merb 9y agowhich means that you do not use a npm proxy.
- austincheney 9y ago> Maybe it's because I've never been a webdev but I just don't understand the fascination with JavaScript. Native lexical scope. Do more with less and write/test it in a fraction of the time. Seriously, a couple of rockstar JavaScript devs could easily replace a large department of equally skilled Java developers.
- hamstercat 9y agoNext time you're forced to deal with JavaScript, try out TypeScript. It's a subjective subject, but it's pretty fun to use and it compiles down to JavaScript. There are a lot of tools around this ecosystem, but as for anything experience helps.
- k__ 9y agoTypeScript, Flow, Reason, ClojureScript...