What Features Should A GUI toolkit have?

Chris via Digitalmars-d digitalmars-d at puremagic.com
Fri Mar 6 04:29:45 PST 2015


On Friday, 6 March 2015 at 11:34:15 UTC, Ola Fosheim Grøstad 
wrote:
> On Friday, 6 March 2015 at 10:55:34 UTC, ketmar wrote:
>> wow, what a shitload of crap! exactly what i mean when i wrote 
>> "most
>> people doing it wrong".
>
> Describe what is right?
>
> To most developers, doing it right means saving developer time 
> and if possible push "design declarative programming" onto 
> designers.
>
> Which is basically what shadow-dom allows you to do. There are 
> some quirks with styling still, but there is overall progress.

I've been working with various GUIs (Swing, Cocoa, JavaFX, SWT, 
GTKD, TKinter etc.) and I am working with HTML/CSS/JS (have to!). 
Frankly speaking, I hate JS and wish there was a way to get rid 
of it (please, don't try to convince me that JS is somehow good - 
it isn't - and that there is jquery and blah dee blah. Please 
don't.).
What I can tell from my own personal experience is that in 
_theory_ something like HTML5 would be very nice, due to the fact 
that it is supported, maintained and improved on all platforms 
(manpower & brainpower), so that you come pretty close to the 
"write once, run everywhere" ideal. Given the plethora of 
platforms nowadays, especially in the mobile sector, it is 
impossible to develop a GUI application for each platform. What 
you want is something based on browser technology that is 
understood everywhere, without having to worry about any platform 
specific quirks or pitfalls. Something that is only a thin layer 
that is agnostic to the logic, the data processing that goes on 
in the app. Unfortunately, the only way to do this today is 
HTML5+JS (it's the JS bit that annoys me).

In the old days (before smartphones), people would develop 
applications for Windows, OS X, and maybe Linux (if it was in the 
budget). But today this is simply impossible. So yes, from a 
developer's point of view, you want something like HTML5/CSS/JS, 
only better, regardless of what's the GUI ideal. Using 
technologies (other than HTML5) that interface to native widgets, 
is not maintainable, you're always one step behind.

To cut a long story short, ideals and pragmatism are at 
loggerheads here, but at the end of the day, you have to get your 
apps out there for as many people and as many platforms as 
possible, with the least effort possible. So HTML5 and related 
technologies win in this respect. And users don't care what's 
under the hood. They simply ask "Can I download an app?". If they 
can't, they are very annoyed. D should find a way to interact 
with the "app world".


More information about the Digitalmars-d mailing list