GUI strategy?

Regan Heath regan at netmail.co.nz
Fri Sep 28 11:01:54 PDT 2007


Gregor Richards wrote:
> Regan Heath wrote:
>> Gregor Richards wrote:
>  1) AWT is the standard. Whoops, that sucks, so let's write
>  2) Swing, the new standard. Whoops, that sucks, so lots of things use

I assume each of these sucked in some fundamental way, something which 
prevented them 'fixing' it without changing the interface?  Or perhaps 
the 'best way to design a gui' changed, or a new design pattern emerged 
as superior?

In any case none of those are reasons not to have a standard GUI 
library.  I'll try and define what I mean by the phrase standard GUI 
library below.

>  3) SWT, which is not standard in that it is not part of the standard 
> library.

A "D standard GUI library" doesn't have to be part of the D standard 
library, it just has to use it, build on it, etc.  It has to be seen as 
the standard way of doing a GUI app in D.  Examples of GUI code in D 
should all use it.  People shouldn't have to ask where is the GUI 
library, or how do I write a GUI app in D, it should obvious.

Essentially all the "D standard GUI library" is, is a label applied to 
the GUI library that best suits D (at the time).  The effect of that 
being consistency, and focus for new development.

Don't get me wrong I'm all for there being as many GUI libraries as 
people want, all with myriad pros/cons, but the downside of this can be 
seen in the current situation where we have a number of half finished 
libraries.

It would be better to focus effort on one library and get it to a stage 
where it's good enough to use for a major project.  At least then if 
people write custom components etc it's likely they're written for this 
library and not some other one.

> Lesson learned? The standard always sucks because the standard can never 
> change, and people will continue to use the standard even when there are 
> superior alternatives. 

I don't see a problem with changing the standard library, assuming a new 
library emerges and does a better job than the old one.

 > The desire to add GUIs to a standard library is
> part of the common ridiculously-poor design of monolithic standard 
> libraries, and thankfully it doesn't have much steam for D.

I don't want a monolithic standard library.  I want a modular one. i.e.

standard core library
standard web library
standard gui library
...

Where the standard gui library module can be swapped for a better one if 
and when "we" want.

Regan



More information about the Digitalmars-d mailing list