News for hackers. Stuff that matters.
Re:Flutter desktop shells by mottosso on Thursday April 25, 2019 @12:22PM (#19749689)
> So (3) is hardly better than (2).

As someone developing GUIs with Qt bindings for Python daily, and has been for the past 8-9 years, I respectfully disagree.

Understanding of the underlying types and memory management is rarely an issue (e.g. once every 3 months), and when it is it's incredibly straightforward (e.g. maintaining reference to a window you've just created else Python garbage collects it for you).

Topics like these appear every now and then and remind me how there are still developers out there that still struggle to find the right combination of language and framework, some resorting to Electron because of assertions like this. This is a solved problem for my line of work - VFX and workflow related tools.

Re:Flutter desktop shells by devwastaken on Thursday April 25, 2019 @03:18PM (#19751561)
Python probably does eliminate a lot of problems of QT, much of its being the static typing of c++. However you are still bound by qt's internal widgets. Creating custom widgets requires reasoning about the renderer and qt's internal code.

The styling system of qt is also quite limited. Their 'css' is a small set that does not work well on everything.

HTML+CSS allows for creating almost anything, it's the same on all platforms if the renderer is right. It's seperate from code and easily viewable and debuggable within a browser program. I have yet to see anything similiar with Qt, or a style heavy program like Discord made in Qt without becoming spaghetti.

Re:Flutter desktop shells by pfranz on Thursday April 25, 2019 @04:28PM (#19752201)
I think Python is a poor choice for UI because it doesn't have a history of handling asynchronous things well. It leans on Qt a lot.

But I also disagree that the styling is quite limited. Yeah, css in Qt is pretty limited, but creating a custom widget doesn't require all that much intimate knowledge (depending how custom we're talking). You can tweak the behavior of default widgets easily, you can draw a completely new one by painting and following the rules (for sizing, redrawing, etc). For new interaction models you'll need to be more familiar with the internals, but that's the case if you're stretching the limits of any framework.

Qt works really well for cross-platform apps that adhere to the OS' style and behavior. I think way too many apps waste time and frustrate users by reinventing the wheel. QML seems to be their approach to UIs untethered to the host OS (I don't have any experience) and seems to be their focus for the past handful of years. Their Qt (Widget) demos always show a bunch of cool features I rarely use, but I do pilfer their code for examples when I need something.

For a Discord like example; Maya, Nuke, and Houdini were all originally developed using their own UI toolkits and have migrated to Qt while maintaining each of their distinctive behaviors. They are all cross platform and require relatively low overhead and high performance with heavily customized UI behaviors.

Maya: https://damassets.autodesk.net/content/dam/autodesk/www/camp... Nuke: https://www.foundry.com/sites/default/files/styles/teaser/pu... Houdini: https://d2wvmrjymyrujw.cloudfront.net/media/uploads/products...

These apps did fork Qt5 when they moved from Qt4 to Qt5, but it was mostly Qt4 regressions and did it in a way intending to contribute their changes back into Qt mainline.

Re:Flutter desktop shells by zerkten on Thursday April 25, 2019 @03:23PM (#19751613)
Putting aside the many resource problems with Electron apps, can you achieve the level of user experience that the Electron folks do?

I see Electron devs being asked to match the slickness of an existing website with similar delivery time and productivity. You don't seem to be able to get close to that with native APIs, API frameworks, or higher-level tools without a lot of work. When you remove these UI and delivery requirements then almost all other frameworks seem to have a fighting chance.

Re:Flutter desktop shells by jacobolus on Thursday April 25, 2019 @08:21PM (#19753777)
My experience is that every Electron app I’ve ever tried has a terrible “user experience” compared to average competently made native Mac apps. Their core UI widgets are non-standard for the platform and are full of bugs and inconsistencies. Latency is through the roof on all sorts of common interactions. They don’t integrate well with standard expected OS features/services. They burn massive amounts of system resources.

From my perspective as a user, Electron apps are for companies who don’t really care much about quality and are too cheap and lazy to write native apps. YMMV.

Re:Flutter desktop shells by userbinator on Thursday April 25, 2019 @10:31PM (#19754365)
Electron is basically "write a web app, package it with a browser, and call it a desktop app."

Ironically, Microsoft was one of the early adopters of the idea of "web technologies for desktop apps":

https://en.wikipedia.org/wiki/HTML_Application

Re:Flutter desktop shells by semireg on Thursday April 25, 2019 @10:57PM (#19754472)
I’m a company of one and I care about quality. I’ve shipped native apps for Mac, iOS and Android.

About a year ago I began work on Label LIVE, an Electron app to interface with thermal label printers. It’s not perfect but it fills a niche. It wouldn’t exist if it wasn’t for Electron. Check out the video or download and give it a try. http://label.live

Re:Flutter desktop shells by pfranz on Thursday April 25, 2019 @04:48PM (#19752369)
My argument is that the UI requirements are almost always nonsense. I hate launching a new app and trying to figure out a new interaction model or fighting a themes/fonts that fight my needs (font sizes, contrasting colors, etc). Basic stuff is often broken and there's a long tail, if ever, for them to get fixed. They're also the best candidates to break during an OS or other library update.

The whole reason OSes give you reusable components is so its easy to implement the conventions users are familiar with. Those are the things that are supposed to be fast and easy.

This likely violates the delivery timelines, but Maya, Nuke, and Houdini are all professional, heavily customized apps that were written in their own UI toolkits but were ported years ago to Qt and are cross platform.

Re:Flutter desktop shells by pjmlp on Friday April 26, 2019 @03:06AM (#19755397)
Easily with XAML/QML.