News for hackers. Stuff that matters.
Re:Electron 2.0.0 beta by beojan on Thursday February 22, 2018 @04:21AM (#16436340)
> one of the best things to happen on desktop, especially on linux desktop ironically

Not by a long shot. It's one of the worst things to happen on the desktop, because people who would have built a proper desktop application just wrap their web app in Electron instead.

It's particularly bad for the Linux desktop, where people are used to small binaries that use the system-wide Qt or GTK so they load fast, and use little RAM.

Re:Electron 2.0.0 beta by stelonix on Thursday February 22, 2018 @04:28AM (#16436377)
When you look at the Linux desktop software stack, I can't condemn anyone for choosing js+html+css over what's available.

There's no consistency between the dozen "toolkits", each one with its own way of doing things and a lack of interoperability. If you ever had to work with X11's concepts of drag'n'drop, windows, input etc. you probably know what I'm talking about. Dozens of toolkits, few of them talk to each other. It's a mess. Electron just works.

People who would have built a proper desktop application simply don't because the tooling, the environments, the standards (and lack thereof) are awful.

The whole concept of "toolkits" is what makes the situation a complete mess.

Re:Electron 2.0.0 beta by beojan on Thursday February 22, 2018 @04:31AM (#16436385)
Admittedly (as a Plasma user) I'm a little biased here, but the answer is to just use Qt (Widgets) and move on. QGnomePlatform and QGTKStyle means Qt works just fine in a GTK-based desktop, while the reverse just isn't true.

Unless you have a good reason (in which case, you'll know), you can just ignore everything other that Qt and GTK.

Re:Electron 2.0.0 beta by stelonix on Thursday February 22, 2018 @04:55AM (#16436485)
It's not just about development, there are numerous applications built in different toolkits which many of us use everyday. Some of these apps are closed source, so suggesting a rewrite in Qt is out of question.

Don't get me wrong, it would be awesome if we could compromise on any given toolkit, but do you honestly see any of them waving the white flag?

Meanwhile, on Windows for example, there's a standard way to write GUI apps, standardized, well-known and consistent APIs to deal with GDI's toolkit etc. It's awful to write GTK apps just as it's painful to write in pure WINAPI GDI, but GDI has the advantage of being the default, so that "native look" is consistent across most applications since the 3.1 days.

Then comes the community: we have 20+ years of GUI programming happening on Windows, most people simply stick to GDI + self-made custom controls. The outcome is a huge knowledge base that helps get anything and everything done on Windows. Here in the UNIX world over the same time period the GUI developers are spread among different toolkits, so we have many "ok" people in a dozen toolkits and few experts on each one.

Re:Electron 2.0.0 beta by beojan on Thursday February 22, 2018 @05:00AM (#16436508)
> Some of these apps are closed source, so suggesting a rewrite in Qt is out of question.

Qt is LGPL. So long as you dynamically link to Qt, it doesn't matter what license your app is under. If you don't dynamically link, you lose the integration benefits anyway, so there's no downside, really (Qt is backwards compatible within each major release, so just build against the earliest version of Qt 5 your app works with).

> GDI has the advantage of being the default, so that "native look" is consistent across most applications since the 3.1 days

History means we have two defaults on Linux: Qt and GTK. Qt integrates well in a GTK desktop though, so you can just use Qt.

Re:Electron 2.0.0 beta by lmm on Thursday February 22, 2018 @10:29AM (#16438167)
> Don't get me wrong, it would be awesome if we could compromise on any given toolkit, but do you honestly see any of them waving the white flag?

No doubt it will be years before everything moves over, but at this point Qt is the clear winner: it's always looked better, its licensing issues are now solved, it's the only option that has remotely decent bindings for a remotely decent language. A month or so ago there was a new release of Wx and the comments here were universally "that still exists?"; GTK will go the same way.

There are other options, there are people who really like those options, but Qt has the momentum and has the knowledge base. Just use Qt and you'll be fine, or at least you'll be no less fine that you were with GDI on windows.

Re:Electron 2.0.0 beta by skeletal88 on Thursday February 22, 2018 @04:43AM (#16436423)
Have you built a desktop application on Linux? What are these dozens of toolkits you are talking about?

Just use Qt.. or GTK. They work and aren't difficult to use. Qt stuff works nicely on windows as well.

Re:Electron 2.0.0 beta by PopsiclePete on Thursday February 22, 2018 @09:06AM (#16437580)
Sure I can use Qt. And deal with C++ and the MOC. Well, by C++ I mean whatever dialect of it Qt chose to support to be backwards compatible with apps from 1995, certainly not C++14 or even C++11 last time I looked and oh yeah - have to use their smart pointers and string/container classes, and learn yet another build system, Qmake was it? And use their “interface builder” and cheap looking Visual Studio knock-off?

Orrrrrrrr - JavaScript/Typescript with the amazing Chrome debugger and get my work done in half the time?

You’re really really not selling Qt at all, least of all to people who might have NodeJS (lots of those) experience and want to get something done quickly.

Yes I’m also aware of Qt’s 200 language bindings and funnily enough, a lot of shitty, slow, crash Qt apps on my Ubuntu desktop are Python with the PyQT bindings. Because even those guys want to get their job done quick.

So, basically - Electron seems like a really nice default choice.

Re:Electron 2.0.0 beta by lmm on Thursday February 22, 2018 @10:32AM (#16438196)
> Yes I’m also aware of Qt’s 200 language bindings and funnily enough, a lot of shitty, slow, crash Qt apps on my Ubuntu desktop are Python with the PyQT bindings.

So much like Electron then?

Use Qt, use Python, and get on with your life. Or use Electron if you prefer, that's fine too. But don't make out like it's the only reasonable option and everything else is too confusing. If you ask 10 developers the right way to do a simple GUI application on Linux, 9 of them will tell you: do it with Qt and Python.

Re:Electron 2.0.0 beta by tjoff on Friday February 23, 2018 @12:39AM (#16444480)
Moc integrates beautifully with cmake and "all" other build tools. There is no need for the interface builder (though I hear people seem to like it, barely tried it myself).

No need to use their smart pointers either, I certainly never have. Never saw any reason to since C++11.

No issue at all mixing with C++11+.

Re:Electron 2.0.0 beta by jacobush on Thursday February 22, 2018 @09:37AM (#16437780)
I hate Javascript and web tech and he didn't sell Qt to me either.
Re:Electron 2.0.0 beta by stelonix on Thursday February 22, 2018 @04:58AM (#16436499)
Yes, I have. Here's some to name a few: GTK, Qt, wx, Fox, fltk...

Yes, I agree, Qt just works. My initial point was and still is about interoperability. They don't all speak well with each other and there are many good, useful applications in toolkits other than Qt or GTK.

Re:Electron 2.0.0 beta by seba_dos1 on Thursday February 22, 2018 @05:50AM (#16436695)
That's hardly a point, since even some of those toolkits you mentioned are also available on Windows and macOS.

We're talking about proper toolkits vs. Electron here. Good luck making Electron look native, yet alone "talk" with anything :P

Re:Electron 2.0.0 beta by skeletal88 on Thursday February 22, 2018 @06:38AM (#16436880)
What do you even mean by "they don't all speak with each other", what are they, and what can't they do (that electron can do?).

With Qt I can use the clipboard, sockets, and so on, set an icon for the application. Linux applications have standards to follow, as long as they do they look the same to the desktop environment.

Are electron apps magically able to speak with other electron apps, in a simpler way (to implement) than Qt applications? I don't think so.

Re:Electron 2.0.0 beta by digi_owl on Thursday February 22, 2018 @04:48AM (#16436450)
> There's no consistency between the dozen "toolkits"

Frankly this is a complete bullshit argument. Qt in particular can be used with little to no code change across the platforms.

And some of the most successful programs on Windows have basically gone their own way in terms of look and feel.

Re:Electron 2.0.0 beta by stelonix on Thursday February 22, 2018 @05:03AM (#16436517)
That's not what i'm talking about. Qt is cross-platform after all. I'm saying there's no consistency in the concepts, how things are built. A Listview in GTK is very different from a Listview in Qt or wx, for example. They fire different events at different points of their cycles, they have different properties, different ways to be customized etc.

You can't, for example, simply fire Spy++ and check what a given widget is doing, as you can with GDI. The lack of a basic widget building block in X11 makes each one implement the very basics their own different way. And when they need to talk to each other, it's at the very least an unpleasant ordeal.

Re:Electron 2.0.0 beta by yoz-y on Thursday February 22, 2018 @04:23AM (#16436354)
I think the idea is that most developers would not make a proper desktop app, and without electron there would just be not app at all. But I think that Electron is a short term good which will cause a lot of long term "bad".
Re:Electron 2.0.0 beta by beojan on Thursday February 22, 2018 @04:27AM (#16436374)
> I think the idea is that most developers would not make a proper desktop app, and without electron there would just be not app at all.

Precisely, people will just use something else. The proliferation of Electron apps splits the user base, so there's less incentive to develop a proper desktop application.

Re:Electron 2.0.0 beta by deadbunny on Thursday February 22, 2018 @09:39AM (#16437798)
> because people who would have built a proper desktop application just wrap their web app in Electron instead.

Except no-one would have built clients for the linux desktop. Go back before Electron and count how many official clients for Linux there were from major software vendors, hell I'll even take massively feature incomplete answers like "Skype" just to help you.

Re:Electron 2.0.0 beta by thezoq2 on Thursday February 22, 2018 @07:24AM (#16437045)
People who built proper desktop applications didn't build them for linux. Even microsoft are releasing their electron things on linux (skype and VS code). I very much doubt that would have happened if they built native apps.

I much prefer the ability to running a slightly inefficient program over not having that program at all.

Re:Electron 2.0.0 beta by nkkollaw on Thursday February 22, 2018 @06:30PM (#16442600)
Most companies would never build a Linux app.

One notable example is Skype: their Linux client sucked so much it was unusable until their Electron version made the Linux version just as good and modern-looking as the rest.

Re:Electron 2.0.0 beta by afarrell on Thursday February 22, 2018 @04:40AM (#16436417)
Can you point to a solid Qt or GTK tutorial for newbies?
Re:Electron 2.0.0 beta by beojan on Thursday February 22, 2018 @04:43AM (#16436427)
Qt has very good documentation (http://doc.qt.io/). Go through the getting started guides, and focus on Widgets if you're developing for desktop.
Re:Electron 2.0.0 beta by v_lisivka on Thursday February 22, 2018 @05:48PM (#16442293)