8 ms·
Something like SwiftUI but open source and targeting GTK4 would be pretty close to my "dream framework" for cross-platform desktop UI. I will admit, Swift synt
by koito17 3y ago
Something like SwiftUI but open source and targeting GTK4 would be pretty close to my "dream framework" for cross-platform desktop UI.
I will admit, Swift syntax is an acquired taste, but once you're familiar with all of the concepts (and understand that some design decisions were made for Objective-C interoperability), then it's a very usable language. To be frank, the only thing that stops me from using Swift is the fact that Linux support isn't as good as on Apple platforms. But if I am targeting nothing but Apple platforms, then Swift is probably the best choice, just for SwiftUI and SPM alone.
- rubymamis 3y agoWhy not go with Qt's QML?
- wizzledonker 3y agoAs someone who works with QML daily, I had the same question. The work is already done. Why write a common UI backend in swift when you can have the whole thing common using QML/Qt. It’s the best way to write native Multiplatform apps at the moment. It just is.
- dhosek 3y agoI’m not entirely convinced that multiplatform UI is a good idea for anything other than the simplest of applications. It always ends up looking out of place on at least one platform and sometimes all of them.
- rubymamis 3y agoIt just takes an effort to make Qt apps look and behave native. This has been one of the goals with my new note-taking app, and I think it looks pretty native (at least on macOS): https://www.get-plume.com/ https://www.get-plume.com/
- mike_ivanov 3y agoLooks gorgeous. Is it QML or pure Qt?
- rubymamis 3y agoThanks! It’s both. The model side and logic is written in C++ while the view is written in QML. That way I get the best of both worlds, the performance of C++ with the ease of use, flexibility, animations, etc of QML. It’s worth noting that most Qt Quick components and much of QML code is compiled to C++, so even code on that side is performant.
- mike_ivanov 3y agoAmazing. This is very inspiring, thanks.
- ezst 3y agoHey, I don't use your app because it's too limited for my "PKMS" needs (I use trilium notes instead), but I appreciate that you make being "native and fast" a distinguishing feature (vs all the other electron based alternatives boiling the oceans).
- rubymamis 3y agoThanks for the feedback, although the app isn’t released yet so you should at least give it a shot once it’s out. I do try to strike a balance between flexibility and ease of use. I think Notion is too complicated (yet very flexible/powerful). With Plume, the focus is to be able to organize your thoughts in a powerful way, effortlessly. Sign up to the waitlist and try it once it’s out. Much more is coming soon.
- ezst 3y ago> I think Notion is too complicated I wrote about the problem space extensively on this site before, tl;dr, to me the issue lies in the fact that most of the contenders aim to manage data/knowledge/notes as "types" (for categorization, templating and derivation/re-purposing), but, to my knowledge, only trilium is enabling that with a "sound" design. Notion is exposing a lot of incidental complexity due to its "unsoundness".
- aplummer 3y agoIt just is is a relative term, for example - I already know SwiftUI.
- pona-a 3y agoFor me, QML, while expressive, had a lot of rough edges. If most of your logic is inside the C++ backend, its JS engine is just useless overhead. If you do something like lite data wrangling in QML, or worse, try to adapt existing JS libraries for it, it quickly becomes a nightmare of standard JS weirdness, non-compliance with normal JS, and just outright ridiculous and difficult to diagnose issues like data getting passed by reference from the previous page and that page getting popped off the stack, resulting in error. And besides that, QML tooling is virtually non-existent. Major code editors don't even ship basic syntax highlighting for it out-of-the-box, the linter doesn't catch anything useful forcing you back into manual testing, and recently added language-server is at best a little useless and at worst impossible to get working correctly because your components live inside the build container and cannot be installed on the host without risk to system stability (Ubuntu Touch Clickable and Lomiri.Components). If something like that was possible for Qt, I'd probably switch in a heartbeat. If our modern programing languages are finally expressive enough to write sane reactive UI and statically verify parts of your logic, why keep relying on the unverifiable and slow DSL?
- rubymamis 3y ago> If most of your logic is inside the C++ backend, its JS engine is just useless overhead. Well, if most of your logic in C++, what's the problem then? For my app[1] most of the logic in C++ but there's still a good amount of logic in JS (out of laziness or ease). BTW, much of QML code is compiled to C++ these days[2] > difficult to diagnose issues like data getting passed by reference from the previous page and that page getting popped off the stack, resulting in error. This is very true, it's quite difficult to diagnose issues in QML, and it doesn't seem to me like Qt ships debugger tools for errors as available for C++ when a program crashes. I relate to your issues with syntax highlighting (although the linter is good imo). Also auto-complete is pretty bad in Qt Creator for QML. I wonder how feasible it is to integrate Typescript into QML rather than JS. But I think that while all these issues should be addressed, developing with C++ and QML is the most joyful combination I've experienced so far for GUI development (I also developed in React and React Native). [1] https://www.get-plume.com/ https://www.get-plume.com/ [2] https://www.qt.io/blog/the-new-qtquick-compiler-technology https://www.qt.io/blog/the-new-qtquick-compiler-technology
- dheera 3y agoI hate Qt, the apps look non-native and don't obey Ubuntu's appearance settings and fonts.
- dartharva 3y agoNobody bats an eye when apps built for Windows don't adhere to its design patterns. Some goes to a large extent for MacOS. I swear Linux users have the strangest obsessions..
- dheera 3y agoI mean, most Windows UIs look like shit, they look like something that would be at a DMV. We Linux users do like our desktops to be sleek, badass, and sci-fi ...
- eitland 3y agoMac users are worse than ordinary Linux users I think (writing this as a Linux user who right now uses a Mac :-) As an ordinary Linux user I at least welcome all applications with bonus points if they are well integrated into KDE. Maybe the Gnome crowd is more picky?
- jwells89 3y agoLongtime mac users definitely have a preference for apps that are not only native, but designed to be good citizens of the mac desktop by abiding by its UI conventions, feature progressive disclosure of power user features, etc.
- tcmart14 3y agoTo be fair, even Microsoft isn't consistent on what people feel like native should look like. I'm primary a linux/mac user as home, but at work I have to use Windows 11. It is surprising that Microsoft gets paid the Windows given that the control panel has a new updated UI that meshes with Windows 11 fairly well, but then you open up something in control panel and need to access more advanced features and your greeted by a UI that I am pretty sure is from Vista or 7. A standard winforms UI looks totally different from a WinUI. Yes, technically they are all native, but they all look completely different.
- p10r 3y agoSounds like Compose and Kotlin, although multiplatform still being more in a beta stage.
- dkh 3y agoIf I had a nickel for every time I got excited about something with experimental multiplatform support... The Kotlin platform looks good and I've kept an eye on it, but the problem is, if I have to start working on an app now, it's still kind of scary, as you're basically just placing a bet on a horse race of which one will mature the fastest down the road. At a previous job, I decided to adopt React Native in its early stages for a project. By some miracle (and with a lot of rolling-our-own) it managed to not hold us back and seemed to mature about as fast as we needed it to, but boy, even then it was still stressful, and I feel like we got a little lucky. (Just to be clear, I also knew this going into it and the choice was mine, I may just have a deathwish)
- travisgriggs 3y agoWe had a Kotlin app written with view bindings and the various other bits and pieces of Android app stack “no now this thing” detritus over the years. I hated it. I cut my teeth on 20 years of smalltalk, so it wasn’t even the “let’s hate on OO now” thing. It was just so much unfinished/inconstant things. We have been porting to Jetpack Compose, and I really like it. It’s still got some growing pains. We don’t use ViewModels, hardly any Flow stuff, just mutable states and render trees and I’ve been pretty pleased. What makes me happiest is that it’s much more consistent. I don’t feel like I’m in a line at the DMV anymore; “oh you need that, go stand in that line and learn that stack, then come back”. Like you, I’m extremely skeptical about the multiplatform siren. We tried it in Smalltalk land. The Java guys tried it and failed. I tried Flutter for a couple of apps, early testing iOS users were totally turned off (so fine for internal simple utility apps only). I would love it if someone really succeeded. We have 2 Swift UIKit apps I’ll have to convert to SwiftUI someday. So I will wish all that try well, but I’m not holding my breath at all. Having a “write once run everywhere” pitch is about the same as politicians who run on “change”. It always sells; it never really delivers.
- pojntfx 3y ago> Linux support isn't as good as on Apple platforms That's definitely still a problem for libraries etc., but thanks to very recent developments (see the article) at least getting your app to users is super simple thanks to the new Swift Flatpak runtime: https://flathub.org/apps/org.freedesktop.Sdk.Extension.swift5 https://flathub.org/apps/org.freedesktop.Sdk.Extension.swift...
- cglong 3y agoIt says the runtime is under GPL3. Does the copyleft apply to all Flatpak apps written using Swift?
- nextaccountic 3y agoI thought that Apple actively avoided GPLv3
- cglong 3y agoIt looks like the runtime is owned by the author of this article, who (from his bio) doesn't seem to be affiliated with Apple. Either way, I agree it seems like an odd choice.
- rock_artist 3y agoa. It's the author using something which is GPL b. GPL is allowed as long as complied. c. GPL mostly limits ability for use within iOS / AppStore.
- flexagoon 3y agoNo, it is the runtime, it's not a part of your app, it just runs it. You can basically think of it as a Docker container (but specifically for desktop apps). You don't have to make your app GPL, the same way as you can run a proprietary app on Linux even though the Linux kernel is GPL
- badsectoracula 3y ago
- dkh 3y agoI remember a few years ago, a few really cool cross-platform UI libraries were starting to emerge such as libui [0] that got me excited. I've kind of lost track of them since then (libui itself went dormant for a while before this fork) so I am not sure how mature/useful they are now, but the potential for writing native desktop UIs in basically any language seemed like an absolute dream. Perhaps it's feasible for very basic things? [0] https://github.com/libui-ng/libui-ng https://github.com/libui-ng/libui-ng
- loic-sharma 3y agoFlutter Linux targets GTK3 and is currently investigating a GTK4 migration. Flutter also supports Windows and macOS.
- PlutoIsAPlanet 3y agoBut it doesn't use GTK widgets, it just uses GTK to make a window. That said GTK on Windows and macOS is very meh. You don't choose GTK for making a cross platform app.
- treyd 3y agoDeluge and Transmission are good cross platform GTK apps.
- IshKebab 3y agoEvidentially it is possible to make GTK apps work at least somewhat nicely on Windows and Mac since there are a few out there. But it's clearly a ton of work. If you just make a standard GTK app it will be terrible. Most toolkits (e.g. Qt or even Flutter) work much nicer without having to fix them.
- sirwhinesalot 3y agoTransmission only uses GTK on linux.
- abrouwers 3y agoThere is a Qt and CLI client, too.
- seabrookmx 3y agoAnd a web UI! (My preferred method as I run it on my home server)
- chungy 3y ago
- nicoburns 3y agoThere is Relm (https://relm4.org/ https://relm4.org/). Which is in Rust is just GTK (through it's Rust bindings) with a nice reactivity layer on top.
- firecall 3y agoFWIW I very much enjoyed using SwiftUI once I got the hang of it! I'd been out of iOS dev for a good long while, and was still thinking in UIKit and Obj-C. Overall I've found SwiftUI to be the most productive and enjoyable declarative framework and developer experience I've used! To be fair my experience is limited to React and Flutter, but still, Apple have done a rather excellent job IMHO! YMMV :-)
- mojuba 3y agoRewriting an app from UIKit to SwiftUI not only eliminates storyboards but also reduces the code base. So once again: you have code plus storyboard XML vs. just code that is smaller! My jaw dropped when I first discovered this while rewriting something. Unfortunately though SwiftUI hasn't completely matured yet. Especially if you are targeting iOS versions prior to 16, you will encounter many of SwiftUI's shortcomings. Some (many?) UI components are still UIKit under the hood, scroll view and its derivatives are still not as flexible as you sometimes want them to be etc. For some custom UI tricks that would be a piece of cake in UIKit are impossible in SwiftUI and you often resort to wrapping the old components in your custom ones. Oh and don't get me started on resorting to the main thread (because of the underlying UIKit code) in the age of structured concurrency. All in all, the concept of SwiftUI coupled with structured concurrency is beyond amazing but its maturing process is still underway.
- dartharva 3y ago> targeting GTK4 > cross-platform ?? Do you know of any GTK4 app that runs well on non-Unix platforms?