Have you tried developing relatively complex UI with QT? You need to hire a team of engineers and spend man-years of effort to build custom UX that in the web / Electron can be replicated with an npm install fancy-library.
Yes, I hate Electron, but the alternative is not QT; it's something like Sciter.JS with real Web API compatibility (or perhaps a stripped down WebKit2 which is much less resource-heavy).
Sciter supports same platforms as Qt and uses H/W acceleration (DirectX, OpenGL) in 10 years or so.
Everything that you can do in Qt you can do in Sciter.
Just in case: Sciter.JS that is in alpha/beta now is aimed as a direct ElectronJS replacement as it uses standard JavaScript (ES6). It already supports MithrilJS and Svelte applications running transparently as in SciterJS as in browsers. React (PReact in particular) out of the box support is coming. The main goal of SciterJS is to provide compact (5mb runtime) desktop runtime environment that can use components and designs made for Web.
I hate electron apps ("Simple and light-weight SQL client" is 200MB [or more, because it filled my drive]), but understand why they are used.
Creating a good UI is just so easy for JS devs. There are tons of libraries and the web compatibility is an extremely powerful point.
I'm really still looking for a solution that is fairly light weight, ease-of-development focused (-> encouraging good code, many don't seem to be) and supports the web as a target.
Kivy is looking to have good principles, but the standard UI kit is quite awful. Supports popular targets except for the web.
Qt quick (controls) enables both a good desktop feel and an aright one on mobile platforms. Doesn't support the web (but PureQML is an effort to port the language).
Haxe looks promising but public adoption, for some reason, seems very slim. Adobe Air and things like that promise similar things, but example apps are complete garbage.
React Native works quite well on mobile. There could probably be a similar effort on the desktop, it's surely possible to do something - but then again I'm not a huge fan of javascript either.
I have started doing projects in a browser myself because it is so easy to get started and share what you made, so I can understand that people would want to just use the work they did and bundle it up for shipping.
It just looks like something could be done for Electron to lose some weight, at least. Why does it require a Nodejs environment and a browser for every app? Why not adopt the browser model of feeding apps into one renderer for display?
Things like that. Maybe they'll wake up some day.
We do need a better setup, but is there any more mature UI platform than HTML+ CSS +JS?
I don't think the concept of wanting to used this advanced interface is wrong, just that the implementation of Electron is bloated - and that web programming culture is far too wasteful because the premise there will only be one important app on the computer.
I have not tried sciter, but making a fast, light Electron alternative is the right way to go. To go with that, I would like to see a new emphasis on fast and light js/css libraries and frameworks that treat desktop as a first class citizen, using light SVGs instead of big raster images, automatically generating stripped down icon packs rather than loading all of fontawesome etc.
That looks like a much more promising way forward than any other UI framework I have seen. The interface with a myriad of languages for actual hardware access and local file/data manipulation are already there for the most part.
Because of this overwhelming benefit in my opinion, it is worth it to go through the development pains to get there as the easiest path to a better dev experience, rather than trying to use some other tech and bring it up to web UI quality and flexibility.
I think sciter is not electronjs per se, it does not do web rendering, instead it uses html/css/js for Desktop(no internet) development, to replace say Qt-based GUIs.
I think a lot of it is that browsers are far superior in creating the design you want. You may have to work around things, but you don't have to learn completely new things that are only for your application.
If you learn to make great looking and functional websites then you can make that into electron. Add to the fact that many services want to have a desktop and web application, it just makes a lot more sense to design its core in Js in a browser environment
As for the obligatory "qt can do that" qt uses chromium to do browser related tasks. The alternative is webviews which are unreliable in any full sized application.
Is the comparison with Qt relevant? My understanding is that Electron is for JavaScript what Qt is for C++. Is there not a better fit for C++ development in the web UI ecosystem?
I miss the Qt Webkit module, it give so much more control over WebEngine. WebEngine is great but anyone one who want to use will be much better served using Electron
Apparently these libraries and the languages they are designed to be used with failed to offer sufficiently easy way to implement the UX people want.
I myself strongly prefer classic desktop GUIs adhering to the 90s Microsoft and Apple design guidelines, also well-designed (rather than chaotically evolved like JavaScript) programming languages too yet the objective reality seems like that's not what the demand is for - real-life companies and people prefer fast-entry non-proprietary languages like JavaScript and virtually-unlimited expression like what CSS gives. The only libraries I know can technically be good alternatives to Electron are Qt Quick, WPF (and its spinoffs) and JavaFX but they all have downsides which limit their adoption.
I want to use html/css/js to create my front-end, Although it is more resource intensive then Qt, it is simply more flexible and has a much richer eco-system to rely on.
Meanwhile the usage of chrome as a run-time is one of the worst parts of electron as every app consumes a lot more memory than a "native" application would need. These days Chrome is so highly sophisticated by now you could easily call it an OS. It comes with a lot of baggage from a Driverstack for Sound, Joysticks and Accelerometers to a whole suite of debugging tools.
Don't get me wrong. Electron is good for what it is: a way to easily write portable apps which can share codebase with a SaaS-Platforms. I would just wish developers would have just taken a different approach e.g. using a more striped down version of chrome or maybe even use Firefox/Servo.
For me, JS+HTML+CSS isn't (I had to outsource most of the UI code to our webdevs), but Qt or GTK (or, god forbid, Cocoa and whatever is Microsoft's newest fetish) are so much less productive that I just cannot justify writing in it any more. If you want a smooth UX with things like animated scene transitions (people scoff at animations, but if used sparingly and at the right places, they improve usability), or just any non-standard widgets, it's far, far easier to do everything in HTML.
And the beauty of Electron is that you can still write all your actual logic in C/C++ and use Node's FFI to bind it to your UI.
(Qt is transitioning to the same model with its HTML+JS based Qt Quick orchestrated from native code; but it's far less production ready than Electron right now.)
FYI Qt like frameworks were here before Electron, this toolkits are not reinventing the Web world for the desktop even if some will use web tech sometimes like JS or cSS.
Also what is the Electron equivalent for QGridView , a table? or you mean Electron + 200+ npm packages, where each project uses different packages and 50% of the packages are the same package but different version
If you want to make Electron obsolete, make a cross platform UI toolkit that mixes UI and document-style content as good as HTML/CSS does.
End user expectations are for complex layouts, flexible typography, rich media embedding, animated interactions, and so on. I've yet to see a QT app come close to what e.g. Slack has managed to shoehorn in.
It'd be great if we could get desktop level robustness out of it too, instead of being limited to scrolling three or four screens up before it has to start paging out content.
Web UI is bad in many ways, but many desktop adherents seem willfully oblivious about why there is such a desire for this. The only native OS that has evolved to compete is MacOS, with its multi touch driven interactions genuinely making most web stuff feel like the janky lowest common denominator that it is.
Sorry but web stacks on electron are much less crappy than desktop UI toolkits which are dependent on Apple, Microsoft or also developer hostile QT and web stack is the only real open/standardized alternative.
Make Electron-like desktop apps but with Qt or within a browser with navigation/menu etc. bars? Running both over Internet and locally at native speed? Avoiding JavaScript for Web UI? I'd be happy to have that!
The aversion is mostly that a lot of devs have learned to use html, css, and js for styling ui's.
I love Kivy as well as QT. You can make some decent looking apps with the former and some incredible ones with the later. I have never personally worked with Electron.
But yeah, most devs use JS, HTML, and CSS for ui creation because of the Web.
I think something like QML could replace the html and css parts, though.
The company I work for hired several incompetent devs who wrote an abortion of an Electron client. It very nearly killed the company. I finally convinced the boss to let me rewrite it in Qt, and now our feedback is far, far more positive on the UX. Qt and GTK+ are one of those things that work "well enough" on the big three, especially Qt (GTK+ has serious theming issues on macOS), and it's hard to justify Electron as long as Qt or at least GTK+ exist.
Fuck Electron. I've seen what it can do to a product firsthand. If you get a competent web dev, it might work, but it will be slower than snail shit.
Just write it in Qt. You don't need to use C++, Qt has bindings for many languages, including Python, Rust, JS with Qt Quick, and even Lua.
Myself, I don't mind modern C++, though in many cases I prefer Rust.
Yep, if you can even compare Electron to Qt. Electron is just a buggy ill-conceived hack to wrap a browser with nodejs to make webpages. All it provides is a blank window with no customisation and a huge size and memory overhead.
An actually good alternative to Electron is badly needed, imo. PyQt seems like a reasonable start for a platform like this.
Electron needs to be competed with in two areas, though: Developer experience and end user experience. Solving just one of them means you don't really compete with Electron.
For a good user experience I'd have recommended a Qt Quick [QML] based interface.
Developer experience requires some good tooling, which unfortunately Qt creator doesn't really provide for me.
Yes, I hate Electron, but the alternative is not QT; it's something like Sciter.JS with real Web API compatibility (or perhaps a stripped down WebKit2 which is much less resource-heavy).
reply