3 ms·
> 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.
by mottosso 7y ago
> 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.
- devwastaken 7y agoPython 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.
- pfranz 7y agoI 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/campaigns/autodesk-for-games/opt/large-maya-2.jpg https://damassets.autodesk.net/content/dam/autodesk/www/camp... Nuke: https://www.foundry.com/sites/default/files/styles/teaser/public/paragraphs/feature-images/NUKE-3D-workspace.jpg?itok=fnhpbjNc https://www.foundry.com/sites/default/files/styles/teaser/pu... Houdini: https://d2wvmrjymyrujw.cloudfront.net/media/uploads/products/overview/character_houdini_ui.jpg 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.
- zerkten 7y agoPutting 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.
- pfranz 7y agoMy 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.
- jacobolus 7y agoMy 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.
- userbinator 7y agoElectron 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 https://en.wikipedia.org/wiki/HTML_Application