News for hackers. Stuff that matters.
Re:Ask HN: What should I use to write native desktop apps fo... by openIce on Sunday May 27, 2018 @12:46PM (#17167749)
Why not simply use Java or C#? No one writes desktop software in JS
Re:Ask HN: What should I use to write native desktop apps fo... by beojan on Sunday May 27, 2018 @01:57PM (#17168148)
Far too many people write desktop software in JS. I wish they wouldn't, but they do.
Re:Ask HN: What should I use to write native desktop apps fo... by aphextron on Sunday May 27, 2018 @03:06PM (#17168532)
It's not so much the greatness of JS that attracts people, but having access to the DOM and browser based rendering. HTML/CSS is the very best possible declarative syntax for building interfaces ever devised really. The alternatives are way less flexible and cross platform.
Re:Ask HN: What should I use to write native desktop apps fo... by beojan on Sunday May 27, 2018 @04:35PM (#17168976)
HTML and CSS are actually a pretty terrible syntax for building interfaces, which is unsurprising given HTML is a document format, and CSS is designed to style documents. If they were really the best possible syntax, you wouldn't have so many popular frameworks.

Rather, HTML/CSS/JS is what you're stuck with if you're treating the web as your platform, which is tempting when your code is really just a front-end for a remotely hosted system anyway.

Electron is the result of people trained in web development turning their hands to desktop development, but not wanting to learn something completely new.

Re:Ask HN: What should I use to write native desktop apps fo... by kevinsimper on Monday May 28, 2018 @04:58AM (#17171378)
Your argument would be much stronger if you actually provided the better alternative, instead you don't bring anything new to the conversation.
Re:Ask HN: What should I use to write native desktop apps fo... by beojan on Monday May 28, 2018 @05:13AM (#17171443)
Qt Quick. Really, anything that has layouts (Windows Forms, for instance).
Re:Ask HN: What should I use to write native desktop apps fo... by aphextron on Sunday May 27, 2018 @07:32PM (#17169761)
>Electron is the result of people trained in web development turning their hands to desktop development, but not wanting to learn something completely new.

"Learning something new" has a massive cost when you apply that to an entire engineering team. A tool that can leverage existing resources to make people proficient in a new area simply through new technology would be a huge value added IMO.

Re:Ask HN: What should I use to write native desktop apps fo... by beojan on Monday May 28, 2018 @12:23AM (#17170580)
Electron just externalizes the cost, it doesn't eliminate it.

Electron is a little like auto-translating your UI. It's easier for the developer and the user pays the price.

Re:Ask HN: What should I use to write native desktop apps fo... by drcode on Sunday May 27, 2018 @03:58PM (#17168827)
> HTML/CSS is the very best possible declarative syntax for building interfaces ever devised really.

Well... I wouldn't go that far, but over the years we've all managed to work around the warts of HTML/CSS and can put up with it.

Re:Ask HN: What should I use to write native desktop apps fo... by aphextron on Sunday May 27, 2018 @07:29PM (#17169751)
My argument basically comes down to the alternatives. Have you tried them? Native iOS development was a nightmare without deep mobile expertise until React Native and the like came about. Windows/Linux/Mac cross-platform apps were in the same place before Electron. IT's far from perfect, but ask anyone today what they'd prefer to build an interface with and it's most like HTML/CSS. Especially for highly graphic intensive, responsive layouts, there's almost no competition really.
Re:Ask HN: What should I use to write native desktop apps fo... by beojan on Monday May 28, 2018 @04:58AM (#17171377)
> Native iOS development was a nightmare without deep mobile expertise until React Native and the like came about.

Doing things well requires expertise.

> Windows/Linux/Mac cross-platform apps were in the same place before Electron.

Seriously?! Qt predates Electron and is a far superior solution. Of course, if you only know web development, your existing knowledge doesn't translate over easily, but the reverse is equally true.

> but ask anyone today what they'd prefer to build an interface with and it's most like HTML/CSS

Only if they are already experienced in web development. Otherwise, Qt Quick is much better, taking the positives from CSS, without the downsides of using a document format to layout a UI.

> Especially for highly graphic intensive, responsive layouts, there's almost no competition really.

Seriously, Qt Quick is far better. Though on the desktop, you'd be better off not building a "highly graphic intensive, responsive layout" and instead adhering to the established norms.

Re:Ask HN: What should I use to write native desktop apps fo... by drcode on Sunday May 27, 2018 @07:38PM (#17169782)
Well, I think it would be pretty easy to take the best ideas from HTML/CSS and make something MUCH MUCH better that would be completely incompatible with these- See for instance subform (https://medium.com/subform) The problem with this of course is that these alternative systems aren't widely supported, but at some point I expect one of the AFGAMs to publish and push one of these alternate layout systems and attempt to get higher adoption.

(Amazon Facebook Google Apple Microsoft)

Re:Ask HN: What should I use to write native desktop apps fo... by eip on Sunday May 27, 2018 @10:18PM (#17170262)
There is a big difference between being the 'best possible' and being the best out of a variety of crappy alternatives.
Re:Ask HN: What should I use to write native desktop apps fo... by atlasM on Sunday May 27, 2018 @12:49PM (#17167760)
Doesn’t everyone write desktop software in JS now? Discord, VSCode, Skype, etc all use Electron
Re:Ask HN: What should I use to write native desktop apps fo... by endless1234 on Sunday May 27, 2018 @01:27PM (#17167971)
You may not like them, but saying no one writes Electron apps is a bit disingenuous, no?
Re:Ask HN: What should I use to write native desktop apps fo... by nso95 on Sunday May 27, 2018 @06:23PM (#17169419)
Lots of people write desktop software in JS.
Re:Ask HN: What should I use to write native desktop apps fo... by whoaminow on Monday May 28, 2018 @12:48PM (#17173382)
Lots of people sniff glue, doesn't mean they should.
Re:Ask HN: What should I use to write native desktop apps fo... by nso95 on Monday May 28, 2018 @01:25PM (#17173602)
I didn’t say they should.