by gbugniot · 10y ago · 0 comments
For non-web developers, there are already well-suited technologies to develop desktop applications: Swing, Qt, Cocoa, GTK, WPF/WinRT, and so on. Maybe theses technologies seem less sexy but there are here from the beginning to do that kind of job.
Please, use the right tool for the right job.
I don't see anything wrong with that statement, Electron really lowered the barrier of entry by allowing using HTML, CSS and Javascript to build cross platform apps, before you had to learn a new language to make it happen (Swift, QT etc).
> "Please, use the right tool for the right job."
I would rather use a tool that I know and build something functional fast, than spending many months learning new language just to make my app cross platform and losing interest because of that.
Electron tries to break the same barrier WebForms did but in the opposite direction. Hopefully it turns out better and doesn't result in a bunch of shitty desktop apps like WebForms resulted in a bunch of shitty web sites.
If you build something functional fast with your favorite tool (not suited for the job), then you will probably spend many months maintaining/hacking your codebase to keep it functional and well designed.
At first glance, Electron apps should be more maintainable, not less, because it's one toolset for multiple platforms, which should translate to faster development time and less total cost of maintenance at the tradeoff of app performance and size.
Also, whether an app is difficult to maintain ought owe more whether (1) you have multiple diverse codebases and toolchains to maintain, and (2) that you have a disciplined engineering strategy.
Again, whether or not Electron is the right tool for the job is a business decision based on business constraints.
Unfortunately, usability and ergonomics are rarely reflected in business "fitness functions" (hell, even making an actually useful tool rarely is these days, thanks in part to marketing having better ROI than delivering value). Business people take care of business goals, and I think it's our responsibility as developers to make applications that don't suck, whether or not it is reflected in the organizational "fitness function".
Using web technologies to develop a GUI has been so much easier than learning a new toolkit, or even language. For one thing, some of the options you mentioned are OS specific. There are benefits to OS-native toolkits, but as a one-man team with a small project, the benefits are small and the time investment large. With Electron, I can build on Linux and release for Win/Mac without any concerns.
Qt is the best option of those you mentioned, and I considered it. But I was never great with C++, and learning a whole new markup language (or being tied to Qt Creator) for the UI was an extra barrier for entry. And I've often found that Qt programs don't look or feel right outside of Linux.
Personally, I find developing a UI on HTML/CSS/JS much easier than any desktop UI toolkit I've tried in the past. Updating the UI from the code, and calling code from the UI is s simple, because that's what it was designed to do. And having a browser console makes debugging and trying things so much easier.
I was never a fan of using JS for anything but websites before, but I decided to give Electron a try and I'm a convert. Perhaps there's enough of a speed difference between JS and native code that it would matter for more complex programs, but for my uses I don't notice a difference, thanks to the speed of JS engines now.
Maybe from someone that's starting with no coding knowledge would find Qt and C++ just as easy to pick up as HTML and JS, and certainly a C++ developer would find Qt a better choice. And sure, I don't expect anyone to be able to build Photoshop on top of Electron. But there are plenty of programs that aren't that complex.
While in theory I agree with not using the "new sexy technologies" for the sake of it, and "using the right tool for the job", I don't think that applies here. It works both ways, don't stick with old technologies just because that's what you're used to. What specific benefits do you get from using one of those toolkits for a simple desktop program?
The real reason you're seeing apps based on Electron these days is that it's easy to hire HTML/CSS developers. That doesn't mean these are good platforms though. I remember when the bulk of apps were being written in Visual Basic because it was easy to hire VB devs (lots of people learned VBA via MS Office).
You're right. They need to catch up to using 5.8 GB for Visual Studio and 480MB for IntellJ to start. :)
What about applications like Photoshop, Premiere, Cubase, Logic? Basically anything that does more than show a couple of editor panes. I'd love to see these kinds of things built in Electron but as far as I can tell this has not happened yet. In these areas languages like C++ and frameworks like Qt are still really really popular. Not to mention embedded development, of course.
That's the difference between toys and tools. Most of the popular applications are toys, and this saddens me a lot personally, because humanity is wasting the potential it has with all that cheap computing available.
> I'd love to see these kinds of things built in Electron but as far as I can tell this has not happened yet.
I don't see it happening any time soon. Web is not meant for serious tools. Compare Microsoft Office and Google's butt office suite. One is a tool, other is a toy that looks nice for simple documents, but is utterly unusable when your document/spreadsheet grows beyond more than a couple of pages.
Well, isn't that an ambiguous claim with a weak anecdotal evidence. What is a "serious tool"? We have our email, crm, analytics, (only) shop, document versioning, etc. online. Actually, the native applications I use are just Visual Studio (can be replaced by code), Sql Management Studio (many web-based alternatives) and the browser itself - that being the only type of application I use with no web-based alternative, which could be seen as an operating system.
I always wonder if pretentious people realize their pretentious and simply don't care, or they're actually oblivious. Perhaps you could enlighten me?
The difference between a "toy" and a "tool" is whether or not something is mainly for fun or mainly for being productive. It has nothing to do with the process used to build it.
Your needs are different, and that is cool - but it does not relegate web apps to "toy" status.
I've seen many complaints about Spotify on e.g. Reddit - specifically about the fact that it's no longer native. Seen also many complaints about bloat and slowness in Atom & VScode.
I understand why this toolkit is chosen, but companies can only push so much before the customers also push back against the decrease in qulity.
Everybody can yell that Qt/Gtk or even the MS stuff is the better tool for desktop apps, it won't change anything.
There's 0 objectivity in the choice. The young boys just think in HTML/JS, so we'd better adapt :-)
It's not at all about how sexy a technology or framework is. I just think I can do a better job in a framework that's adapted to my skillset, instead of adapting myself to a new framework.
You used to be able to use Delphi or VB6 to make working desktop apps in very short times. I'm sure other will reminisce about other older desktop techs that were a breeze to use.
MS severely dropped the ball with WPF by making it have a very high learning curve just when javascript was really exploding. So not only was it easier to distribute web apps, they were cross platform and it was easier to make them too (although the massive pain of SPAs has changed that).
There was also Adobe Flash Builder that very briefly looked like it would be a competitor when Balsamiq was a big new thing, but it never really took off (only other thing I've seen use it is salesforce's SOQL tool). At that point everyone hated Adobe though, so it didn't have much chance.
Though interface builders help a lot, I've always had a problem building more dynamic interfaces through any of the native tools. React, for example, makes that a lot easier.
Try to stay at least a little bit realistic...
One thing is that React is the newest iteration of production-quality declarative UI management. Angular, Backbone, a lot of stuff came bdfore. And all that contributes to a mature understanding
That being said, I forgot about QT quick. That is also pretty powerful stuff. Though the web influence seems there ( correct me if the causality is wrong).
I ask because I quite like JavaFX. The developer/documentation website is fusty and old-fashioned looking, but the tech itself is just really solid. You can tell it's been made by people who have spent their whole careers doing UI toolkits.
Which part of Electron makes it wrong?