Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Building an UI is hard, even with language with good support for it. Web ui are hard. Python ui are hard.


I have been held back for years because of the sad state of desktop UI frameworks. I have recently embarked up creating my own, if only for my own purposes. It's a nightmare.

One of the primary issues is that there is no foundational cross-platform support. For creating windows, GLFW is the best bet. I should give kudos here. GLFW works and is well-documented, a rarity indeed. The forum is also pleasant. For graphics, Skia is probably the best solution, but it has problems. For example, it is 2D only, has support on a Google Group with not much traffic, and is complicated to build. The binding for it on .NET is currently not actively maintained, despite being effectively owned by Microsoft. You also give up performance. For example, Direct2D is much faster than Skia on Windows, and Direct2D can seamlessly interact with Direct3D in the same window. But SharpDX (the .NET bindings) is no longer maintained and DirectX is of course Windows only. Then you have macOS which is completely antagonistic. It is locked to an extremely old OpenGL version, and Apple may remove it at any indeterminate time. So you either build against OpenGL or start jumping through hoops in GLFW and Skia to use Vulkan and Molten to talk to Metal on macOS. Also, macOS is the only OS that forces the window management on the main thread. All window management on all OSs is on a single thread, but on Windows, for example, that thread can be any thread. Then there's Linux and the umpteen million distros and the two window managers in X11 and Wayland. There is no cross-platform accessibility library that I know of.

On top of all this, all pf these solutions have limited to no support. Most projects are ran by just a couple of people, if that. This is not a complaint against them in any way, as it is simply an observation of the reality in that support is highly, highly limited. There's also the issue that many of the issues encountered are complex and often reach across several stacks. For example, is it a bug in Skia, GLFW, the bindings to these, the OS, the graphics drivers, or from the interaction of these.

There are also very few resources and references for stuff like this.


If I read your post correctly, you might be interested in reading the readme and maybe the code of this library I've been working on (even though it's only 2D, and (purposely) not advanced 2D): https://github.com/jeffhain/jolikit/blob/master/README-BWD.m...


Thanks for the reference! That's a great README with lots of information. Curiously enough, I had already starred your repo at some point.


> For example, Direct2D is much faster than Skia on Windows

Much faster? I’m not necessarily doubting this but you have some evidence? Isn’t Skia even used by Edge? And everybody here is basically claiming that the only UI frameworks that matter are web based - so if it’s good enough for that…

Also Qt Quick - seems to cover all the platforms mentioned. Of course it has a ton of resources poured into it, but it’s there.


Qt is pretty damn easy I would say. And some Web UIs are easy too.

In any case this article is talking about the features that are unique to Rust that make it especially hard to write GUIs.

Though weirdly it focuses on lack of inheritance which is definitely not that big of a deal (Rust does have trait inheritance - you can even get full implementation inheritance using macros if you really want but I doubt it is needed). The biggest issue by far is state management because of the single ownership rules.

You can of course Rc-RefCell everything but that gets very ugly.


I can confirm. I'm regularly surprised how slow my iOS developers are at developing a few screens.


It's amazing how much we've regressed since Delphi.


And Visual Basic for all of its faults..


I started programming with Visual Basic 6 and still feel robbed that in the 25 years of programming after I never built a native GUI.


I never fully understood why we couldn't have the VB/Winform model of building GUI on the web. Is it because we need the designer skinnable GUI? With WebAssembly and CSS grid layout, could we finally get a modernize VB/Winform?


Because the web has nothing to facilitate that. Almost literally nothing: from rich components to data handling to control over rendering if needed.

So the VB/Winform model of building GUI on the web has to re-invent all controls from scratch, then all dat abinfding from scratch, then...


Sounds like an idea for a startup!


Perhaps one of the local or browser-based IDE companies could take this on too.


There are plenty of services that offers that.

Even MS used to provide that with frontpage.

The real answer to your question lies in why people don't use them much.


Because they used to produce dubious code leading to poor rendering result.

I would like to say the Web was poorly designed but that would be too generous. The Web wasn’t designed at all. It’s a hodgepodge of poorly thought out technologies hastily cobbled together. It’s a piece of technology designed to display static textual content horribly contorted to make applications.

It took decades for JS and CSS to reach a state I consider barely useable and the best we could do is apparently flexbox.


> and the best we could do is apparently flexbox.

And grid.

The contortions you have to go through to get the equivalent of early 2000 Qt's spacer items and anchors...


Ten/Twelve years ago me and a colleague would build random desktop apps using WinForms and C#, they were deployed using a network share and ClickOnce. They weren't the most elegant pieces of software ever developed, but it sure was easy to slap together a small tool for the warehouse manager or someone in sales.

You can still do all that, on Windows. As I get older and have more experience, I have come to the conclusion that some people are more interested in the technology and less so in solving actual problems. While I'm pretty happy with my career, if I were to do it all over: Windows, Visual Studio, C++ and WinForms would have been the tools that I'd have picked. We're coming up on 25 years of a fairly stable, actively developed platform with pretty good backwards compatibility.


Maybe I missed some opportunities but with my later experience and in my line of work I got pushed towards webapps and these days PowerBI. I can make those work but I feel that as a beginner with VB6 I could build forms faster than I can do now in a browser.

Also, I remember not being completely precise: I maintained a hacked together GUI build in Access VBA. It had its warts but its web-based replacement didn't blow it out of the water and took longer to develop.


React Native is a lot faster for building out prototypes but slows down when you start building more complex screens and can be very brittle to maintain over time.


I always boggle a bit when somebody measures development velocity "by the screen"

It's smoke above pinched fingers creating a bottleneck. Whether the fingers belong to bureaucracy or dev capability requires more info than I have. My bias says look at whoever has the biggest ego and the strongest opinions. They're the anchor.


uikit or swiftui?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: