top | item 19155078

(no title)

AboutTheWhisles | 7 years ago

No it isn't, flash was the best way to do many things for the years it was popular. Video, vector animation, simple interactivity.

Electron is only the best way to do something when someone knows only javascript and web dev but doesn't want to learn a new language. Maybe a case could be made for severe misconceptions also helping electron like 'a custom native app has to be made for each platform', even though C++ and Qt and many other combinations can be written once with 99% of the source being the same for every platform.

discuss

order

SquareWheel|7 years ago

>Electron is only the best way to do something when someone knows only javascript and web dev but doesn't want to learn a new language.

Why is there always someone ready to jump in with this elitist nonsense? There's plenty of reasons to use a web stack even if you know other languages. It's inherently crossplatform, has an extensive library, and is extremely quick to iterate on.

Slack and Discord building in Electron means they only need to maintain one codebase across web, desktop, and mobile. They don't need separate teams for building in Java, Swift, and C#. They only need to write a new feature once. Crazy, right?

This "web programmers are dumb" attitude is nothing but elitist rhetoric. Cut it out.

sixstringtheory|7 years ago

I keep seeing this "extremely quick to iterate on" point being brought up in defense of Electron. Slack released threads 2 years ago and we still can't post snippets, images, or use many slash commands inside them. Their last genuinely new features in the last year were synced DM drafts and the little lock badge on workspaces you're signed out of. Where's the iteration?

Meanwhile, almost daily I hit so many issues with the macOS application that I have to walk away from my computer in frustration. It makes my working life miserable due to its poor performance and bugs, and it encourages awful organizational and communication habits.

derefr|7 years ago

> There's plenty of reasons to use a web stack even if you know other languages. It's inherently crossplatform, has an extensive library, and is extremely quick to iterate on.

The GP's point was that, in the year 2019, none of these features are unique to the web.

• For "frameworks", there's Silverlight, Adobe Air, Haxe, and—strangely enough—Flash itself, which still works just fine if your goal is to ship a standalone "projector" app rather than something that runs in a browser.

• Or you can use a cross-platform scripting language (e.g. Python) with a cross-platform GUI toolkit (e.g. QT, WxWidgets.)

• Or you can use a not-cross-platform language (e.g. C#) but just use the (pretty large) subset of that language that is compatible with a third-party cross-platform runtime (e.g. Mono). Before you laugh, this is exactly how many companies code games to be cross-platform: they just write them for Win32 but constantly test them under Wine to ensure they aren't breaking Wine compatibility. Then they ship one native version and two virtualization-layer-wrapped versions.

• Or—horror of horrors—you can just use Java, and use the various Java-to-native-X compilers to target mobile platforms like iOS. (It worked well enough for Minecraft!)

saagarjha|7 years ago

> Slack and Discord building in Electron means they only need to maintain one codebase across web, desktop, and mobile. They don't need separate teams for building in Java, Swift, and C#.

Did you know that Slack has native iOS and Android apps, as well as a cross-platform C++ "LibSlack" run by another separate team?

nv-vn|7 years ago

Qt is also cross-platform, easy to use, and has a giant library to work with. You can use it with virtually any language you want. Plus it runs on mobile.

bdcravens|7 years ago

> This "web programmers are dumb" attitude is nothing but elitist rhetoric.

I don't think that's the attitude. The attitude is that they are lazy/stubborn, not dumb. I personally believe most developers are smart enough to keep learning. Whether or not they are willing to put in the work is the question.

Gibbon1|7 years ago

> Why is there always someone ready to jump in with this elitist nonsense?

Because it's absolutely true. You'll know it once you watch a web dev try and work on desktop app.

happy_man|7 years ago

"They only need to write a new feature once. Crazy, right?"

Yeah!, why you old farts want me to learn about the stack, the heap and all of that OS architecture crap?, I don't need or want that #$@&*, I barely can keep up with all the JavaScript frameworks/libraries/toolkits that came out last week!

JustSomeNobody|7 years ago

Wait a minute. I have seen the argument for Electron because devs "get" to use one language they already know. So, let's just take a step back and reset...

sime2009|7 years ago

> Electron is only the best way to do something when someone knows only javascript and web dev but doesn't want to learn a new language.

What toolkit or library would you propose instead? Seriously, what are these great alternatives? Doesn't necessarily have to support JS.

nv-vn|7 years ago

There's a ton of really popular, well-supported options

* GTK

* Qt

* WPF for Windows

* JavaFX

* Tk

* LibUI

I'm rooting for https://github.com/revery-ui/revery/ right now too, but it's still early in development

8draco8|7 years ago

1% difference is a lot in software development. Electron is like Flash, it allows cross platform apps with one codebase. By the way Flash used ActionScript which have a lot in common with JS so that’s another similarity.

derefr|7 years ago

Electron is the best way for a third-party to wrap someone else's web-app into a more-fully-featured desktop app when that someone else doesn't want to ship a native app.

For example, there are a number of desktop Facebook Messenger "clients", that can pop OS notifications and so forth. They're all based on Electron. None of them are built by Facebook.

Similarly, there are a number of desktop Gmail "clients", not built by Google. They're all Electron, too.

The only alternative to this approach, would involve reverse-engineering the company's web-app's (proprietary, undocumented) API to write a native client library for it, and then constantly fighting the company as they try to block your native client library from being able to access their backend service. Some projects do that (there are at least two "native Gmail clients" that are actually native and are built on a reverse-engineering of the Gmail web-app backend API) but it's really not worth it if you're just a dev trying to scratch your own itch of wanting better desktop integration from these web-apps.

reificator|7 years ago

I have never seen Qt be proposed without immediately being shot down for the licensing.

michaelmrose|7 years ago

I was under the impression that it was available under the lgpl and only had to open source changes to the actual library that you aren't likely to need to make not your application.

emilsedgh|7 years ago

Which is usually based on just misunderstanding LGPL.

You "can" write a proprietary app with Qt and you wouldn't have to pay for it.

simion314|7 years ago

I am wondering what is the issue with dynamically linking Qt, are developers statically linking with MS c/c++ runtime or GUI libs ? From my experience you must install c++ runtimes on windows or if you use C# you need to ask your user to make sure to have it installed, where with Qt you ship the dlls.

beamatronic|7 years ago

Isn’t Gnome/GTK supposed to be kind of close?

faissaloo|7 years ago

>Electron is only the best way to do something when someone knows only javascript and web dev but doesn't want to learn a new language. More like Electron is only the best way to do something when you're a business that's in dire need of developers and needs a cross-platform solution.

jrs95|7 years ago

Even if you were equally proficient in C++ and JavaScript, you can't tell me that Electron isn't significantly more productive.

seba_dos1|7 years ago

It really isn't. Even the multiplatform aspect of Electron is PITA - abstraction layers are so poor you usually have to support every platform separately by yourself if you want to reliably use stuff like systray icons or notifications.

Well, there's one exception - it sure is more productive if you already have a webapp to reuse.

AnIdiotOnTheNet|7 years ago

Add up all the time and resources wasted by an Electron application for all users over the lifetime of the application, then compare that to the amount of developer time supposedly saved.

gammateam|7 years ago

> Electron is only the best way to do something when someone knows only javascript and web dev but doesn't want to learn a new language

and when you want to fire all the obsolete specialists while making a product with one person that works for everyone. I mean, you can keep one specialist, since they know javascript too

x0x0|7 years ago

electron also allows sharing code between web and mobile, plus the cross platform. afaik qt doesn't address that.