December 24, 2012
On 2012-12-24 12:12, Russel Winder wrote:

> Possibly worth noting that the hope is that Swing goes away very soon
> now. JavaFX is the current offering for graphics and GUI on the JVM. Of
> course writing UIs in Java is a pain, hence GroovyFX
> (http://www.groovyfx.org). But, of course, writing UIs manually is a
> pain so the generator to use is Griffon (http://griffon.codehaus.org).

It's possible to do the same in D, although it's a bit more verbose:

http://pastebin.com/twiqqLpw

Also, I'm planning to write a GUI builder (somewhere down the road) for DWT.

-- 
/Jacob Carlborg
December 24, 2012
> Am one of those who prefer to use native widgets compared to something like GTK. But as you say they don't all provide all features. I think a good idea is the use a cross-platform GUI library for the common widgets that exists on all platforms, i.e. buttons and windows. There's not reason to use the native API for those. Then extend that with platform specif code using the native API, i.e. unified tool bar, sheets and so on, that is found on Mac OS X.

But there will always be the issue of "feature not yet supported" and bugs are introduced when the same code is run on a higher version of a given os. And it may take a while to fix it, i.e. to know what has changed in the new version etc. Native bindings are a never ending story. I have worked with some native-binding framworks and there is always an issue (maybe even a bug in the native os).


> I agree that it would be really nice to have a cross-platform GUI framework written explicitly for D. But as you say that would be an enormous task to do.

Not sure. Maybe trying to catch up with and cater for at least 3 different platforms is the bigger task in the long run.

In my opinion, as D is getting ever more mature, it is about time we had a reliable standard cross-platform GUI. It need not be a framework like Swing. Maybe a more modern solution (HTML etc) would do the trick. I think there is a widening gap between what you can do with D in terms of business logic (a lot) and what you can do with it in terms of connecting it to the desktop / smartphone, i.e. to the user. D has what it takes but languages can only take off if they have some sort of GUI too (cf. Objective-C after the iPhone was introduced, and app development in general). Sorry, that's my marketing mind speaking again.
December 24, 2012
On 2012-12-24 13:59, Chris wrote:

> But there will always be the issue of "feature not yet supported

I don't see how your approach would be any difference. "Hey, the Win32 API has support for a calender widget, why doesn't the standard D GUI support that".

> and bugs are introduced when the same code is run on a higher version of a
> given os. And it may take a while to fix it, i.e. to know what has
> changed in the new version etc. Native bindings are a never ending
> story.

The same thing can happen with a non-native GUI as well. You need to use some kind of functionality to draw the GUI somewhere.

> I have worked with some native-binding framworks and there is
> always an issue (maybe even a bug in the native os).

It's sounds like your suggesting that a non-native approach wouldn't have any bugs. I'm sure you're not, that would be crazy.

>> I agree that it would be really nice to have a cross-platform GUI
>> framework written explicitly for D. But as you say that would be an
>> enormous task to do.
>
> Not sure. Maybe trying to catch up with and cater for at least 3
> different platforms is the bigger task in the long run.

I can assure you that what the SWT/JFace developers are doing and have been doing for many many years are far more time consuming than porting SWT to D. We would have to the same work as we're doing now, plus the same work as the SWT developers have been doing for, say, that last 20 years.

Note also that DWT doesn't support nearly as many platforms as SWT does, and probably never will. Hmm it seems they have dropped the support for a couple of platforms.

> In my opinion, as D is getting ever more mature, it is about time we had
> a reliable standard cross-platform GUI. It need not be a framework like
> Swing. Maybe a more modern solution (HTML etc) would do the trick.

I don't think that would work with the D community.

> I think there is a widening gap between what you can do with D in terms of
> business logic (a lot) and what you can do with it in terms of
> connecting it to the desktop / smartphone, i.e. to the user. D has what
> it takes but languages can only take off if they have some sort of GUI
> too (cf. Objective-C after the iPhone was introduced, and app
> development in general). Sorry, that's my marketing mind speaking again.

I more than agree that D needs a GUI library, I just don't agree with you how it should be done.

-- 
/Jacob Carlborg
December 24, 2012
On Monday, 24 December 2012 at 13:21:57 UTC, Jacob Carlborg wrote:
> On 2012-12-24 13:59, Chris wrote:
>
>> In my opinion, as D is getting ever more mature, it is about time we had
>> a reliable standard cross-platform GUI. It need not be a framework like
>> Swing. Maybe a more modern solution (HTML etc) would do the trick.
>
> I don't think that would work with the D community.
>

why not? have you read my post in this thread? having a Qt-like or Gtk-like interface framework which would give users "widgets" by hiding declarative and glueing code would be practically same way as using other non-D toolkits including their D ports.

>
> I more than agree that D needs a GUI library, I just don't agree with you how it should be done.

and this is another problem, while D has lots of users, the current active community is quite small(correct me if i'm wrong), and even in such case all programmers trying to do their own stuff because they think their way is more "correct", yes you can judge me too, but sadly this is the fact.
December 24, 2012
[..]
>> I have worked with some native-binding framworks and there is
>> always an issue (maybe even a bug in the native os).

> It's sounds like your suggesting that a non-native approach wouldn't have any bugs. I'm sure you're not, that would be crazy.

No, of course not. But the bugs would be in-house, i.e. in one place and could be dealt with immedieately, whereas with native bindings you have two possible sources for bugs, one of which (the native os) you have no control over whatsoever.

I don't actually care how exactly a standard GUI toolkit for D is accomplished (I am not into software-philosophical debates) as long as it is done and done quickly (My apologies, I sound like a CEO now!). I only have my doubts whether DWT is really the best solution or whether we are just wasting time.

This said, my post is not intended to slight the efforts of DWT developers, far be it from me!
December 24, 2012
On 2012-12-24 14:39, evilrat wrote:

> why not? have you read my post in this thread? having a Qt-like or
> Gtk-like interface framework which would give users "widgets" by hiding
> declarative and glueing code would be practically same way as using
> other non-D toolkits including their D ports.

It's just a feeling I have but I can be wrong.


> and this is another problem, while D has lots of users, the current
> active community is quite small(correct me if i'm wrong), and even in
> such case all programmers trying to do their own stuff because they
> think their way is more "correct", yes you can judge me too, but sadly
> this is the fact.

Yeah, I know.

-- 
/Jacob Carlborg
December 24, 2012
On 2012-12-24 14:51, Chris wrote:

> No, of course not. But the bugs would be in-house, i.e. in one place and
> could be dealt with immedieately, whereas with native bindings you have
> two possible sources for bugs, one of which (the native os) you have no
> control over whatsoever.

You always need to have some kind of connection to some other library/platform, be it a web browser or the native GUI of the system. You might be able to minimize that connection and minimize the number of bugs there is always the possibility of bugs.

> I don't actually care how exactly a standard GUI toolkit for D is
> accomplished (I am not into software-philosophical debates) as long as
> it is done and done quickly (My apologies, I sound like a CEO now!). I
> only have my doubts whether DWT is really the best solution or whether
> we are just wasting time.

DWT is done (well, nothing is ever done but useable) now, except from for Mac OS X. Can you point me to some other GUI library that is done and is using a non-native approach?

Well, now that I'm thinking about it there's GTK, which is basically the only other GUI option for D that is usable. GTK is far from native.

-- 
/Jacob Carlborg
December 24, 2012
Have a look at Sciter (http://www.terrainformatica.com/sciter), Andrew Fedoniouk of Terra Informatica once did Harmonia for D1, Hope he would do a Sciter version or wrapper for D2.

Zz

On Monday, 24 December 2012 at 10:57:48 UTC, evilrat wrote:
> On Monday, 24 December 2012 at 10:34:42 UTC, Chris wrote:
>>>
>>> so i think HTML/JS is the really(but not only, yes) crossplatform(phones, set top boxes, pc's, just about everywhere...), fast, cost effecient(the only tool you need to start develop is text editor and browser with developer tools, almost all if not any has such tools, there is lot of designers and JS programmers, and so on) and modern UI, so you can take a look at my recent project - http://forum.dlang.org/thread/azrwqdorulvwhjcmmrxx@forum.dlang.org though it still in alpha
>>>
>>>
>>> sorry if that's not what you expect for gui framework stuff such as gtk or qt.
>>
>> I'd prefer a fully-fledged pure D solution for desktop apps. With D's ability to integrate C code native extensions should be manageable. But the framework should be self-contained like Swing. With extensions I mean things like using a Mac menu bar, use system services etc but the widgets should be D's own.
>>
>> However, I also like HTML/JS solutions but am not sure whether they can replace a real GUI framework like Cocoa or Swing. JS is at times cumbersome to use for user interfaces.
>
> i'd try to clarify... my project IS just another bindings project but it binds to HTML stuff library. inside this library one could do anything using only declarative language(HTML+CSS) and bind that declarative code using JS to D part, that way one would focusing on making UI elements, UI style(look'n'feel), UI JS glueing code(and thats all separatedly, MVC in effect) apart from native D code, so writing cocoa menu's or other stuff and present it to HTML world should be simple, actually it even doesn't need to do this, since D part would contain business logic and HTML part is just all UI code isolated.
>
> so it's more likely one may want just make programmaticaly-like UI framework(like qt/gtk) on top of HTML/CSS/JS written in D which does all declarative and glueing stuff behind the scene to mimic "truly D ui's", at least from programmers point of view there would be no difference.
December 25, 2012
Is there a timeline for DWT Mac (moving it to D2)? I think it's D1 & Tango at the moment. Will there be D2 & Phobos? Sorry if the questions are a bit naive. I'd love to use DWT. For now, I can use a Cocoa front end for my D program, but I'd love to have a cross-platform GUI one day.

By the way, how do you pronounce DWT - "DWAT"?

I was also thinking that embedded D (like PHP or JSP) would be nice too. I know, I am a bit of a D-reamer, but I think D should get out there into the world of "real world" applications. It's just too good to remain an "insider thing".

December 26, 2012
On 2012-12-25 22:40, Chris wrote:
> Is there a timeline for DWT Mac (moving it to D2)?

Unfortunately no, there is no timeline. I'm doing this on my spare time which, as for most here, is very limited. I'm also working on other D projects.

> I think it's D1 & Tango at the moment.

Yes, that's correct. I started the Mac port when DWT was still only D1 Tango. I've been working on this way too long.

> Will there be D2 & Phobos?

It definitely will be. Since I started with D1 and Tango I want to finish the port first, before I switch to D2. I'm hoping the switch to D2 will be fairly easy since the utility libraries/functions are already ported to D2 (the Windows and Linux versions use them).

> Sorry if the questions are a bit naive. I'd love to use DWT. For now, I can use a Cocoa front
> end for my D program, but I'd love to have a cross-platform GUI one day.

I want to use DWT as well. Since my main platform is Mac OS X it will happen.

> By the way, how do you pronounce DWT - "DWAT"?

I pronounce the three characters separately, D-W-T. DWT is short for D Widget Toolkit. A play on the original name SWT - Standard Widget Toolkit.

> I was also thinking that embedded D (like PHP or JSP) would be nice too.
> I know, I am a bit of a D-reamer, but I think D should get out there
> into the world of "real world" applications. It's just too good to
> remain an "insider thing".

D kind of had that feature. I don't know if it's still available but deprecated or completely removed. I think it could extract all code in code-tags:

<code>int i = 0;</code>

http://digitalmars.com/d/1.0/html.html

-- 
/Jacob Carlborg