In response to “Electron is flash for the desktop”
rempel.world
rempel.world
Here's a good Flash animation. Fits in 1.9MB.[1] Enjoy. Flash had excellent authoring tools aimed at animators. Try doing that in Electron. Electron is from people who are still stuck at the command line and try to do graphics by writing code.
[1] http://vitenka.com/users/ChanCats/penelope_pitstop_gt.swf
Electron has excellent authoring tools aimed at web developers. Namely, the ones they are already using.
That's kinda the whole point. :)
I don't disagree with you. The Flash authoring tools WERE amazing.
When I'm feeling in a trolling mood, I tell people that Flash is still ahead of JS and HTML5. Not only was the IDE incredible, but AS3 was literally a typed version of JavaScript with XML liberals. That's right, it had the best from JavaScript, TypeScript and JSX, 10 years before any of that existed in the front end web development toolkit.
And you guys hate on Flash! :)
By contrast, javascript was still that weird language almost no one took seriously, before jquery, before "the good parts". It had abysmal performance (way worse than flash), and couldn't do cross-browser graphics (firefox released some basic SVG support towards the end of that year, IE6 had that weird VML thing, and adobe had a slow bloated SVG browser plugin which crashed every 5 minutes).
So, yeah, back in its prime, flash was unbeatable for client-side apps and games. But, things change.
You must have a very different definition of excellence if you believe that the current web authoring tools (whatever IDE or editor + plugins people use) are in any way close to "excellent".
1. reflow when resized (unlike a PDF);
2. work with screen-readers (unlike naive custom rendering engines in games et al);
3. work with accessibility-enabling UA stylesheets (unlike native UI toolkits);
4. be printable without a separately-authored for-print version;
5. if stateful, uses idiomatic HTTP request/response cycles that enable network-level HTTP caching;
5. if a web-app, talks to a simple mostly-stateless HTTP API that can also be consumed unchanged by API client libraries.
There is a reason that Dreamweaver and Publisher are separate apps; and there is a reason Rails/Phoenix/etc. don't support server-side stateful controls like Seaside or the IBM 3270 terminal protocol do. The web is its own thing, and as long as the web is the thing we're targeting, the authoring tools we have are likely about as good as we're gonna get.
(Unless, that is, you can teach your devs to think in terms of distributed actor systems, where all your Javascript code assumes any actor could be remote like in an Erlang system. Then we could have our UI builders and transparently server-ize them too. But would anyone put up with it?)
The general idea:
void OnPaint(PaintCommands p, Rect limitToRect)
You can finally sort-of do this, with RequestAnimationFrame and Canvas maximized, and it is indeed way faster than HTML, at least, on my desktop. It resizes if that's what you do inside of it. For games this is pretty much mandatory.It still sucks in many ways though. More could be achieved with just directly exposing OnPaint, 2d and 3d versions. Plus various basic things, like copy-paste, don't work.
It doesn't satisfy half your demands, I realize that (though windows accessibility can be quite good too, and the web's accessibility sucks badly). But I would argue that having actual complex apps was worth more (compare MS Office to Office 360 or Google Docs, or worse, compare things like Corel Draw or Lucidchart to the Lucidchart web app, or any other HTML5 drawing/charting app).
And let's just not talk about Desktop Games versus either web games or even phone games. It's depressing.
I know there are other metrics, but you have to admit that's a big one.
I assume you meant "literals"? If not, they have my vote. ;)
* it was closed source, and the tools were not at all cheap.
* their VM was a security nightmare.
* it allowed wanna-be developers to unleash all sorts of abominations on unsuspecting web users. e.g: ads, animations, 10 MB web sites, auto-playing videos, etc.
Luckily for us, JS has solved all thr... I mean tw... I mean the first problem.
Flash is now called Animate and can export to HTML5. Why couldn't one use that in Electron?
[1] http://www.adobe.com/devnet-docs/edgeanimate/api/current/ind...
Electron is not even MS Paint; Electron is Preview.app. It doesn't assist you in making anything. It's a viewer. Do you blame Preview.app for not making it easy to make PSD files? Do you expect it to help you with that?
Electron is, morally, a transpiler. It's a thing you shove a completed application through, and get a completed application for a different platform out the other side. The only necessary "Electron" part of an "Electron project" are the Electron-specific configuration fields in the package.json file. And that's effectively just a release/distribution spec file, much like the debian/ dir for projects that ship .debs.
Which is all to say: there is no such thing as an "Electron project." There's just "web projects" that happen to ship Electron releases. (And, yes, there are projects that never bother to test in any other configuration, so they lock themselves into their code only working on Electron. But this is no different than locking your web project into only rendering on a particular browser.)
It is macOS only (for now). I haven't measured if it is more performant when in the background, but I will. It'seems certainly way smaller in disk size, but comes with tradeoffs in API/functionality.
I think the problem is everyone is trying to match the Electron API and the multi-process/IPC hoops. If they would just build it like a localhost-only webapp, they'd get so many benefits including the small app size.
You could use a similar trick of wrapping go code, but instead of assuming Chrome is installed, just host your front end using the native webview. Requires no other installation than your app that way.
I'm guessing no Node or any other API to interact with the OS (file system, etc), right?
There are no APIs like file APIs, those would be the first APIs to add for sure.
But, like you said, it comes with its own set of downsides
A web wrapper that uses the system's resident web renderer would be a wonderful alternative to electron. A Linux build could also use WebKit, and perhaps the Windows version could be based on Edge.
It was based on Adobe AIR, a cross-platform VM that used ActionScript as the language, which at the time looked a lot like what ES2015 is today -- Adobe basically tried to make ActionScript the same as "ES 4.0", an effort to add classes, properties and private/public visibility to JavaScript that was eventually abandoned in favour of smaller improvements in what became ES5, then ES2015. Flex/AIR had a pretty rich UI framework with semi-native widgets and access to the OS.
It was unfortunately heavily based on declaring your UI with XML, and apps tended to look like "AIR apps", much like Swing apps look a bit off and non-native.
It's also a bridge for Linux desktop to get critical, same-in-class app support. Not a final destination but a possible breakpoint infusion.
As computers get faster I think that the difference in performance of apps using electron versus platform native apps will be imperceptible.
[1]: Contrary to what Intel has been pushing with their lamentable "mobile-first" strategy.
You're going to be more and more in the minority on this. Even though I prefer Chrome, on my MacBook I use Safari because I find it's battery usage to be significantly less.
I don't notice anything similar with VSCode, so its not Chrome/electron implicitly.
They are x86 systems that run the same operating systems as big desktop towers. Many people use laptops as their one and only x86 machine. Why would you not lump them in with desktops?
Until something better comes along I’d have to agree that Electron is the only way to assure that a developer’s audience are first class citizens regardless of the platform on which the developer’s application is deployed.
In my case, my app ran on an embedded web server and the UI was rendered by Electron. When ever I make changes the app code, I simply run scripts to create installation files for Windows, Mac and Linux (deb). This is done in minutes. What other platform would allow achieve something similar?
There is nothing easy about having to make your desktop UI in HTML+CSS and dealing with the cumbersome "browser JS" and "nodejs in background" divide.
Things that allow people to do more with their existing skill set, even if it's not the most efficient, are generally good. They support organic growth of platforms, creativity, and exploration of things that were previously out of reach for some individuals. They can certainly become unmaintainable and problematic, but if the app's usage grows to a point where those are important problems to solve, they will get solved. Or they won't and they'll become a limiting factor in the usefulness of the application.
Evolution is a fantastic thing ;)
Aside from the fact that you don't redistribute the entire JRE with every Java app.
Or the fact that their UI toolkits are not horribly hacked together messes, and actually manage to hit 60fps.
Electron apps are a regression from Java apps. And HotSpot is a little wonder of performance, unlike V8
Though, it is true that nontechnical users are unlikely to realise the difference, they probably don't know an app with not many functionality costs hundred megabytes. Maybe I am just getting old and grumpy, maybe that's how assembly programmers see C programmers.
Also isn't it only a lower barrier if you already know html/css/js
On a 2015 macbook pro with 16GB of RAM.
The buggiest and most resource intensive apps I use tend to be the native ones (iTunes, Dropbox, BusyCal, Evernote).
Also, I haven't used Evernote in years but last I checked, their app isn't true native but instead some kind of web wrapper trying to look native.
Both Rambox and (as I understand it) Franz just load the web interfaces of the services you configure, so performance wouldn't be better than Chromium, since that's what Electron uses. The added value is in the wrapper, which helps to keep everything organized, lets you open and close all services at once (by opening/closing Rambox), and provides a global 'do not disturb' mode for notifications.
To display a chat. Or four.
(Technically Spotify and Adobe CC use CEF instead of electron but it's the same idea)
https://techcrunch.com/2012/12/18/wunderlist-2-goes-native-o...
The result? Fat applications that take up lots of resources, poor user experience that doesn't match the native look-and-feel of the OS, and a huge surface for problems or security vulnerabilities. (Just the other day I was tweeting to the developer of an Electron app when I discovered that their simple chat app was linking to CoreMIDI on macOS - what exactly for?!)
I still recoil a little bit when I look at the DOM of the average Electron application, because it's horrendous and scary and HTML still is not the correct tool for the job, no matter how much people try.
I'm glad that it is inspiring people to create, but in doing so we're teaching new developers bad practice.
Probable because Chrome does it and the developer has no control over this.
Not to ham on the guy personally but someone posted his new cross-platform app on HN that put an icon in the systray/menubar and built it on Electron. The end result was something that should take up a few mb of memory at most consuming over 300Mb(!) of memory. That's simply ludicrous.
- text/document presentation (with advanced typography -- css3 is still crap)
- embedded hw accelerated bitmap canvases (for when you need total control)
- vector based main drawing (hw accelerated)
- styling language (that doesn't cascade by default)
- embeddable/loadable fonts
- richer set of form controls (e.g. at least sliders, date/time pickers, etc)
- compact, compressed delivery
- ability to pry content open (no opaque blobs)
- video/audio playing
- a JS-without-the-BS (like an "enhanced strict-mode")
- a high level control (widget) description language (XAML, JSX style)
- self-contained custom widgets
- overridable built-in widgets (form controls)
- a sensible layout system (grid style), that doesn't assume everything starts as a text-based document.
and no legacy DOM stuff, no SVG crap, no CSS, etc.Instead of all the BS work in asm.js, Dart, the nth W3C standard, etc and kludges on top of kludges, they could have something up and running in a couple of years, and push it to their evergreen browser new releases.
Have Google and Bing penalize websites stuck in legacy HTML and most of the web give way to this new hotness in 10 years or so -- and the rest run in legacy-mode in stricter sandboxes.
The main problem, people developing apps on top of that framework will have to deal with compatibility issues across various browsers and their versions.
On Windows (including mobiles), the only embeddable browser is Internet Explorer.
On OSX, iOS and Androids since 4.4, it’s different versions of Blink.
Electron solves this problem by redistributing a specific version of the browser, this way the app no longer depends on the OS and its updates.
But web developers wanted to have a super recent engine and the same one across operating systems so we have what we have.
Well, yeah, but that's a refutation of the entire web. Maybe we should go back to the days when only a chosen elite was able to distribute writing or software to a wide audience?
Cross platform desktop toolkits are usually SIMPLER to build apps in because they don't have the document-centric baggage of HTML/CSS/JS stack.
People have been building cross-platform software since forever - heck, in 1980s you had to port your game/software on several different architectures and bedroom programmers (far from "chosen elite") regularly supported Ataris, Amigas, Commodores, PCs and other platforms.
Which one is simpler than Electron, in your opinion? Because it seems like a lot of people would like that sort of thing.
[citation needed]
It doesn't mean that the quality of the product decreases, but that the average quality of whatever is made with the product decreases from a user's perspective.
Just take a look at WordPress; I'm going to assume that over time the product itself has gotten more secure and usable due to more eyes being on it and it's adoption rate increasing, but being secure in itself doesn't mean that it can't be used insecurely.
If it fails to terrify you, reread.