4 ms·
The thing is, are those alternative toolkits better? Done right, they're faster, for sure. But when you use Electron you're leveraging thousands of man-years o
by stupidcar 9y ago
The thing is, are those alternative toolkits better?
Done right, they're faster, for sure. But when you use Electron you're leveraging thousands of man-years of Google developer effort to build a web browser that works consistently and well across different platforms. Although the web platform gets a bad rep for cross-browser compatibility problems and general weirdness, a huge amount of that goes away when you target a single runtime. Suddenly you can use every half-baked Chromium API and prefixed CSS feature without worrying about how it's going to break in IE 11.
In that situation, you suddenly realise just how much power the web platform give you. You can style any element, any way you want. You have you have a complete, out-of-the-box object model for your whole UI, plus developer tools to help you debug it. You have advanced typography control. You can drop a canvas element in and get an immediate-mode 2D or 3D graphics API. You can layout stuff in flexbox or grid, or just as a plain old document (which most toolkits would delegate to an embedded web browser anyway).
There are better languages that JS, that's true. But whether there are truly better cross-platform app toolkits than the web is, in my opinion, rather more unclear.
- mattgreenrocks 9y agoThat Google felt the need to invest millions of dollars into making a document delivery platform into something resembling an app platform is not really relevant here. Sure, it is robust. But the whole point of the thread is engineers are notoriously bad at asking what the customer _needs_ from a product vs what the engineer finds fun to write. You want to have fun as an engineer? Work on a side project. The larger the dependency, the more it should have to do to justify itself. "It's fun to write in" is not a sufficient justification for a 70mb dependency. "I need a cross platform app" is better. As an engineer, you're responsible for the transitive dependency graph that gets delivered to customer machines. If you want to take on gigantic dependencies because they are the current lovechild of ascendant Medium bloggers, be my guest. I prefer to go off of more than fun and social proof when making engineering decisions, however.
- flukus 9y ago> The thing is, are those alternative toolkits better? IME, yes. Most of those toolkits also have thousands of hours invested to work well across platforms, not consistently but natively, or at least a close facsimile of native. > In that situation, you suddenly realise just how much power the web platform give you. You can style any element, any way you want. You have you have a complete, out-of-the-box object model for your whole UI, plus developer tools to help you debug it. You have advanced typography control. You can drop a canvas element in and get an immediate-mode 2D or 3D graphics API. You can layout stuff in flexbox or grid, or just as a plain old document (which most toolkits would delegate to an embedded web browser anyway). So nothing that hasn't been true of desktop apps for decades then? If you want power then nothing beats being able to overide the paint method of a widget, you have complete and total control. If you're interested in seeing how easy desktop apps are I built the canonical todo list in Gtk (https://gitlab.com/flukus/gtk-todo/blob/master/main.c https://gitlab.com/flukus/gtk-todo/blob/master/main.c), the goal is a demo that's a bit more complex than hello world. This is in a language not known for it's terseness, uses one of the nastiest parts of the framework (GtkTreeView) yet it still comes in at less than 100 lines of fairly straight forward and simple code.
- styfle 9y agoYeah, this is is actually one of the reasons I used Electron for a screen-recording project...because most browsers didn’t implement the experimental screen recording APIs yet but Chrome already had it. https://github.com/styfle/magnemite https://github.com/styfle/magnemite
- imron 9y ago> You can style any element, any way you want. You have you have a complete, out-of-the-box object model for your whole UI, plus developer tools to help you And it only costs you 400MB of RAM and 20% CPU utilization!