Favorite GUI library?

Uknown sireeshkodali1 at gmail.com
Tue Apr 24 11:15:43 UTC 2018


On Tuesday, 24 April 2018 at 10:30:21 UTC, Chris wrote:
> On Monday, 23 April 2018 at 14:38:44 UTC, TheGag96 wrote:
>
>>
>> That's definitely what I'm trying to avoid... I feel those 
>> kinds of interfaces are 99% of the time mega bloated for what 
>> they are. Discord is the only one that seemed big enough for 
>> the britches of an entire browser instance. Absolutely not a 
>> fan of Electron and the like.
>>
>> I have never tried dwt! I should give that a shot. And I was 
>> trying gtkd once, and I should probably try again. Back then, 
>> I had to compile with --build=plain due to some weird linker 
>> issues.
>
> The advantage of using web technologies for UI:
>
> - high re-usability: use the same or similar 
> layout+functionality for desktop, Android/iPhone apps and web 
> based UIs.
> - freedom as to layout and theming with CSS (highly 
> customizable for users too)
> - cross platform: no need to deploy libs (e.g. Gtk on Mac and 
> Windows)
> - maintenance: older JS code / CSS will still be ok in _most_ 
> cases, whereas Gtk and other frameworks introduce depractaions 
> and breaking changes so that you have to a) rewrite parts of 
> your code and b) maintain older (outdated) versions of the 
> program until you can be sure that the older libs are no longer 
> used / distributed
> - distribution: While users don't care about your maintenance 
> costs, they do care about having an app available on their 
> smart phones/desktops/online. So multiply various versions of 
> say a Gtk app by platform (_at least_ you have to maintain 
> 2Gtk*3Platform = 6 apps). Users hate being told that it only 
> works on Linux desktop. Thus, web technologies can be a real 
> gain.
> - progress: web technologies have made huge progress JS and CSS 
> are much better now. Layout and js engines are much smarter as 
> well. So you benefit from this and get it more or less for free 
> on every platform.

These are nice points, but the fact remains that running a web 
browser torun something as simple as a text editor is extremely 
inefficient. I personally don't use atom, VS-code or anything 
else, because they are all very slow. I tried VC-code once. It 
was nice in terms of UI, but was borderline unusable because it 
would take almost half a second to register keys, and the laptop 
fans would always spin up.
Using it on a laptop means:
- You will be using far more memory. This means its harder to 
open multiple tabs or programs (profiler + editor or docs in 
Firefox)
- Mobile device battery life takes a hit. This is non negligible. 
Battery life on my old mac using just vim (with a few plugins) is 
6 hrs. With vs-code it was 2-3 hrs
- Way more on disk memory. With disk space becoming cheap, this 
is less of a concern for most modern devices, but why be 
wasteful? Besides, in developing countries, its still pretty hard 
to get lots of storage, which means users are forced to decide 
which apps are more important.
- If the mobile device's CPU is under less load, in general it 
will remain cooler and thus less likely to throttle. Putting 
pressure on the thermal cap by running CPU intensive programs 
like a browser, when it can be done more efficiently is bad

We should be getting more efficient with time, especially 
considering Moore's law is on its last legs, not less efficient


More information about the Digitalmars-d mailing list