Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Cross-Platform GUI Toolkits (Again)? 517

Futurepower(R) queries: "It has been 2 1/2 years since the previous Ask Slashdot about GUI Toolkits. There were many helpful comments then, such as this one. Since then, Slashdot has discussed wxWindows vs. MFC and considered the book, Creating Applications with Mozilla. The best comparison table is apparently still the GUI Toolkit, Framework Page. Which is the best cross-platform GUI toolkit that provides native look and feel? Which is the best overall? What IDEs and other tools do you use? What are the problems?" Slashdot also had a match-up between GTK+ and Qt, but some of you might have missed that one. How have recent changes in this ballpark changed your feelings on the issue?
This discussion has been archived. No new comments can be posted.

Cross-Platform GUI Toolkits (Again)?

Comments Filter:
  • by Anonvmous Coward ( 589068 ) on Tuesday January 21, 2003 @08:28PM (#5131708)
    Ha! Just kidding. Put the torches out, please.
    • but it really did help me get started in programming oh so many years ago.

      If you really do use BASIC, I recommend RealBASIC [realbasic.com] for Mac OS X. I could never stand it for serious development, but it's a lot better than VB with features like syntax formatting to make lame code easier to read.

      I used it to throw together a custom client for my Fortune [frob.us] page for all the lame OSes in a few minutes. BASIC is still easy to look down upon and all implementations are seriously lacking in vital(at least to me) areas. RB doesn't have UDP support, and VB doesn't have syntax formatting.

      Back to the serious topic and away from replying to a joke: Java's SWING toolkit is my favorite multiplatform toolkit. A single binary works for most platforms, and "advanced" features that we don't consider necessary in disagreement with our respective (former :) bosses.

      For quickly drafting small projects, PHP and other server-side scripting languages are a great option. I would love to be able "throw togethor" something like this as well as package it into self contained binaries for winshit and OS X.
  • FLTK (Score:5, Informative)

    by Deflatamouse! ( 132424 ) on Tuesday January 21, 2003 @08:29PM (#5131717) Homepage Journal
    The Fast Lightning Tool Kit is very nice. I've used it on Sun OS, Linux and Windows. Compiles between platforms without much change to the source at all...mostly its the system calls that needs to be changed, nothing related to the GUI.
    • Re:FLTK (Score:5, Informative)

      by Deflatamouse! ( 132424 ) on Tuesday January 21, 2003 @08:32PM (#5131743) Homepage Journal
    • FLTK also works on MacOS X, and the current development branch will soon add support for several embedded interfaces as well...
      • Re:FLTK (Score:3, Insightful)

        by SiMac ( 409541 )
        The Mac OS X version of FLTK works, but it's mostly a joke. The widgets look nothing like Aqua; the menubar is (IIRC) at the top of the window rather than at the top of the screen. As much as I'd like to use it, it just doesn't adapt too well to OS X.
        • make xconfig doesn't look very gnome2-like, but I still use it.

          Users will judge a product based on how it performs, and (hopefully) not how it looks.
        • Re:FLTK (Score:3, Informative)

          by printman ( 54032 )
          The plastic scheme gets you closer, and assuming that Apple doesn't jump all over us the 2.0 release will have an Aqua scheme as well.

          As for the menubar at the top of the screen, you just have to use the Fl_Sys_Menu_Bar widget.
    • I've tried out Fltk. It worked alright for simple tasks, but I couldn't figure out how to make more complex programs.

      For instance, I wanted my program to use TCP/IP (regular bsd calls: socket, accept, recv). I used Fl::add_timeout [fltk.org] and Fl::repeat_timeout [fltk.org] to check the incoming buffer every few seconds (no need for high data rate).

      That worked great- unless I made some call like fl_file_chooser [fltk.org], which blocks until it returns. Then the timeout function won't happen until the dialog box is done- a fact completely ommitted from the documention.

      I suppose I could dig into the source code (it is LGPL after all) and try to fix it, but things like this don't inspire confidence.
  • Swing. (Score:2, Insightful)

    by XNuke ( 5231 )
    Seriously, the question wasn't limited to C/C++, which brings lots of other baggage besides teh GUI.
    • Re:Swing. (Score:2, Insightful)

      by Shade, The ( 252176 )
      Seriously, the question wasn't limited to C/C++, which brings lots of other baggage besides teh GUI.

      And Java doesn't bring lots of baggage?!
  • by cr@ckwhore ( 165454 ) on Tuesday January 21, 2003 @08:31PM (#5131734) Homepage
    Kinda ironic that I'm seeing a .NET ad on this page

  • Cocoa or GNUstep (Score:5, Informative)

    by kwoo ( 641864 ) <`moc.liamg' `ta' `edocwjk'> on Tuesday January 21, 2003 @08:32PM (#5131740) Homepage Journal

    I personally think that Cocoa and GNUstep deserve to be mentioned among the best-designed toolkits around. Both follow the OpenStep guidelines rather closely, and the OpenStep guidelines are very well-documented on Apple's site.

    GNUstep is also quite portable -- I have used it on three or four platforms, and have no doubt that others work great. My only complaint about GNUstep is its idiosyncratic build system, but I believe that's a left-over from NeXTSTEP, the precursor to OpenStep.

    If you're interested in learning more about Cocoa and other OpenStep-compliant toolkits, check Apple's developer site and the Hillegass book, published by AW.

    • Yes, but... (Score:4, Informative)

      by FPhlyer ( 14433 ) on Tuesday January 21, 2003 @11:51PM (#5132863) Homepage
      In order to achieve the cross-platform compatability between gnustep and cocoa, you have to code on the gnustep platform. Apple has added much to make cocoa differ from the original openstep specification. So taking gnustep and compiling it on cocoa works fine... but not so the other way around!
  • Swing (Score:5, Insightful)

    by Tom Davies ( 64676 ) <tgdavies@gmail.com> on Tuesday January 21, 2003 @08:34PM (#5131757) Homepage
    Swing is functional and cross-platform, free-beer, and widely understood.
    • Re:Swing (Score:4, Interesting)

      by Minna Kirai ( 624281 ) on Tuesday January 21, 2003 @09:11PM (#5132018)
      Swing works on a single platform: Java. And not all Java [sun.com], either.
    • Yes, I know, Sun wants Swing to be cross-platform. I was really hopeful when it came out. The first few years, it looked like Sun was going to make it work and work out the kinks. But after several years, it's clear that they won't be able to do that any time soon.

      Swing still really falls short compared to other cross-platform offerings. In particular, performance and correctness of Swing on X11 and Macintosh are iffy: for example, window management is broken on X11, antialiasing makes lines disappear on Macintosh, and graphics can crawl to a halt in the presence of transparency on both X11 and Macintosh.

      Another problem is that Swing is, as you point out, only "free as in beer": it's not open source and there is no open source implementation. Sun could, at least in principle, pull the rug out from under you at any time, for example, by starting to charge for commercial applications. And I recommend that you read the JRE license very carefully--it already comes with many strings attached (e.g., Sun reserves the right to install software on your machine).

      If you need to write cross-platform prototyping code, Swing is OK. However, something like wxPython is probably both a bit easier to use for prototyping still and works somewhat better across platforms.

      If you want to write professional-looking, robust, and efficient cross-platform applications, Swing is not the answer, at least for now. Programming in something like wxWindows or Qt may be a lot more work, but at least you can get the job done.

    • Re:Swing (Score:3, Insightful)

      by viktor ( 11866 )
      Swing might be cross platform, but it isn't native look-and-feel, which the original poster suggested the topic of discussion was.
  • SWT using Eclipse (Score:3, Informative)

    by DamienMcKenna ( 181101 ) <damien@mc - k e nna.com> on Tuesday January 21, 2003 @08:34PM (#5131760)
    The SWT engine in Eclipse [eclipse.org] seems pretty cool - rather than using Java's standard slow SWING engine you get a toolkit that passes through to the native UI, which results in a much more responsive application.
  • TK... (Score:5, Informative)

    by velcrokitty ( 555902 ) <glebite@r[ ]rs.com ['oge' in gap]> on Tuesday January 21, 2003 @08:34PM (#5131763) Homepage

    Nice and portable and reasonably consistent feel and appearance.

    And for those who like to use it in a scripting environment, use it as is. Use it with Perl, C, C++, etc...

    • Re:TK... (Score:3, Interesting)

      by Xtifr ( 1323 )
      I have to strongly agree, it's simple, it's reasonably clean, it's popular, it's been around long enough to well supported and accepted. And it runs on just about anything out there. And it's the default widget set for most of the most popular scripting languages: perl, python, ruby, and of course, tcl. Yet somehow it stays apolitical.

      Of course, I may be accused of bias, since I'm the new Tcl/Tk maintainer for the Debian project. But in all honesty, I don't even care that much for tcl. It's ok, but nothing to write home about. It's tk I like, and tk that made me willing to adopt these packages.
    • Re:TK... (Score:3, Interesting)

      Tcl/Tk is great. Lots of people certainly get great mileage out of it doing "quick and dirty", but if you design your code right, it can be quite clean as well. Tcl is flexible enough, and has enough of its C API exposed that you can load OO as an extension - [incr Tcl] is a popular one, if you want to do OO. Of course, it's possible to do "design patterns" kinds of things even without that, you just have to be clever about it.
  • Eclipse (Score:5, Informative)

    by asv108 ( 141455 ) <asvNO@SPAMivoss.com> on Tuesday January 21, 2003 @08:35PM (#5131769) Homepage Journal
    If your looking to Java for cross-platform development and cli is not your thing, Eclipse [eclipse.org] is a nice IDE that works nicely on windows and linux. Its also open source.
    • by aquarian ( 134728 ) on Tuesday January 21, 2003 @08:56PM (#5131924)
      Eclipse does have a few glitches in the Linux version.

      For those that don't know, Eclipse is based on a unique IBM GUI toolkit called SWT. It has a Java API, but the underlying code is native. The supposed advantage of this is that it can be used by any Java programmer as an alternative to Swing, but it's faster. The problem is that it's only available for Windows and Linux, and since the underlying code is native, it has to be separately developed and maintained. Since more GUI apps are run on Windows, there's more pressure to make the Windows code work right, and the Linux code is always a little behind.

      I don't think there's any advantage to SWT these days, with Swing programming coming along so well. For anyone who doubts this, have a look at IntelliJ Idea, a really nice Java IDE that's Swing-based, and super fast. Frankly, I think Eclipse and SWT was a move to establish an IBM-centric Java community, with lots of vendor lock-in. Hijacking Java from Sun, if you will.

      Eclipse *is* a really nice application, but I don't think IBM's motives in creating it were at all community-minded. And I don't have high regard, or high hopes, for SWT.

      • Eclipse *is* a really nice application, but I don't think IBM's motives in creating it were at all community-minded.

        Yeah, they're really hurting the community by replacing proprietary Swing with open-source SWT. :-)

        The fragmentation is a little disappointing, though.
      • by yiingineer ( 604803 ) on Tuesday January 21, 2003 @10:25PM (#5132419)
        Actually SWT has several really nice advantages. I agree that Swing has improved a lot in the past few years, but Swing apps are still not native apps and users can certainly tell the difference. SWT applications are essentially native applications not only in appearance, but also in functionality. There will always be little keyboard shortcuts or imcompatibilities that Swing will miss that SWT programs inherently account for because they use the native implementations underneath. SWT apps are generally considered more responsive than Swing apps. As cross-platforms toolkits go, the one-to-one mapping design philosophy has also been embraced as a great idea from an architectural stand point. (see http://www.eclipse.org/articles/Article-SWT-Design -1/SWT-Design-1.html for reasons why) The SWT is not available for only Windows and Linux. It also works on Motif (for Unixes), Carbon (Mac) and I think they even have one for and embedded platform named QNX. Also, IBM had no intentions of creating an "IBM-centric Java community" with the development of SWT. SWT was originally created to be used in Eclipse and the simple reason why they didn't use Swing was because Swing was horribly slow and ugly back then. I would say that it still is fairly slow and ugly, but one might argue that if Swing was in its current state when the Eclipse project was started that IBM may not have bothered to create the SWT.
  • by nuzoo ( 588862 ) on Tuesday January 21, 2003 @08:37PM (#5131781)
    If you're talking about true cross-platform compatibility, combined with ease of development and deployment, then Tcl can't be beat. It's always been good, but recent developments, such as the Starkit [mini.net]packaging and runtime system, make it a hands-down winner.
    • nonsense (Score:5, Interesting)

      by RelliK ( 4466 ) on Tuesday January 21, 2003 @11:04PM (#5132662)
      Tcl is a complete hack of a language. Imagine a Bourne shell, but with a totally ugly syntax. It is completely unsuitable for any sort of large application (and I have had an exteme misfortune of writing a farily large project in Tcl/Tk). What's wrong with Tcl? Let's see...
      • It's a scripting language, interpreted on the fly. That means only the parts of the code that are actually being executed are parsed. You may have a syntax error in another part of the code, but you will not notice it unless you run that code. Even Perl parses the entire file before running it, but Tcl, just like shell, essentially treats the file as a stream of commands.
      • It's weakly typed. This is actually the bane of all scripting languages that makes them unsuitable for large projects. You can assign an integer / float / string / file handle / whatever to the same variable without the interpreter even twitching.
      • Here is a biggie: it does not force explicit declaration of variables.A variable simply comes to life when it's first used. Good luck trying to debug misspelled variable names.

      And these are just my biggest objectsions. The Tk widget set is not bad. It is quite ugly and limited, but good enough for a small GUI app. The underlying language though is absolute crap.

      The only good thing about Tcl is that it provides a (relatively) easy way of interfacing with C code: you can expose C functions as Tcl commands (e.g. you could map Tcl command foobar to C function MyFooBar()). This is, in fact, what Tool Control Language was designed for: exposing C functions to a high-level script to facilitate easy automated testing. However, trying to write a real application in Tcl is an excercise in futility. There are much better alternatives available. But, if all you have is a hammer, everyting looks like a nail -- that is why Tcl is the "past and future king".

    • I agree ... except that it doesn't respect screen settings very well on Windows. About 15% of apps written in Tcl don't work ok on my machine, either the window doesn't fit on the screen (because it's 800 x 600) and the programmer forgot to add a scroll bar, or the text doesn't fit in the window (because it's large fonts), or I can't read the text, because it doesn't come out in large fonts. HTML has similar problems, particularly lots of stuff that doesn't fit into the designated frames and often the scroll bars are not present on the frames.

      There are about 130 relatively plausible configurations of screen size and fonts under Windows. There are very few toolkits that will work well with all of those, and that's on just one platform. I know of someone who tested Delphi and VB against all the combinations and found that they each worked well with only about 90%. Cross-platform that will handle all the variations on multiple machines and look good and make it possiblt to put a reasonable pantload of data on the screen regardless -- likely impossible.

  • Java (Score:4, Insightful)

    by gUmbi ( 95629 ) on Tuesday January 21, 2003 @08:37PM (#5131789)
    This might be a little too obvious, but how about Java - a cross-platform language, API and GUI framework.

    And, if the speed of Swing bothers you, you can try IBM's SWT toolkit. I'm very impressed with it so far.

    Jason.
    • Re:Java (Score:5, Insightful)

      by plierhead ( 570797 ) on Tuesday January 21, 2003 @09:43PM (#5132206) Journal
      The question is, at best, a little too simplistic: Which is the best cross-platform GUI toolkit that provides native look and feel? Which is the best overall?

      I myself would favour Swing over others, though I'm really only fully conversant with MFC. But I fully realise that it depends what you're doing.

      If you're building a mass-market app you plan to sell you all of the great unwashed out there, then you probably need to make it look very Windows-centric. Practically speaking, something like a turbo tax is probably going to get 99% of its revenue from Windows users. Its crazy to use anything - like Swing - that doesn't give you the best, most up-to-date look on Windows (though Sun would claim it is native look and feel). Use MFC or something like that.

      If on the other hand you're building something like an IDE, other factors come into play. The fact that your app runs on linux as well as Windows will probably be a key sales point to your target audience. And your app is probably far more complex than a mass market app - meaning you need good productivity and a strong underlying architecture(which, IMHO, Swing gives you). Your users are likely to care less about the memory requirements of a technology like Swing.

      Or as a final example, if you're writing a game, then screw their sheety GUI ! Code everything yourself from lines, dots, and mouse events. Make your list boxes scrollable using human skulls as thumbtabs, have rats running up and down inside your text fields to show focus. (personally I would also use Swing for this but realise that may be straying into personal predjudice).

      In summary, its no good saying "whats best". It depends on what you're coding.

  • I'm sure Microsoft will provide GUI toolkits for the X-Box themselves. They don't need a bunch of geeks working on some kind of open source solution. Everybody knows that open source is just a fad. Microsoft said so.
    ;-)
  • The biggest difficulty in creating cross platform toolkits is resolving the different paradigms inherent in each platform.

    X is based on a networking concept where anyone can access anyone else's screen as a network resource. This leads to multi-threading issues as it is possible for two people to use the same desktop, even same application, simultaneously. As a result, toolkits that have their origins in that environment like GTK and wxwindows have strong multi-threading support not to mention strong networking support.

    OTOH, Windows was built around a single user concept, which from a networking perspective is more secure because a person's desktop isn't a networking resource (but that's neither here nor there). This results in the base windowing subsystem's reliance on processes as the fundamental object of execution (as opposed to threads). So toolkits built upon Windows (MFC, OWL, QT) are able to harness Windows's windowing support in a way that more easily and effectively takes advantage of the features of the subsystem.

    Attempting to port one toolkit from its home platform to a foreign platform leads to problems of "look and feel". AWT and Swing are prime examples of toolkits that look strange whereever they are used. Likewise, wxwindows feels funny running on Windows and GTK looks funny. Hell, MFC doesn't even run on X.

    What this all boils down to is that cross-platform development is always going to have limitations because the roots of each toolkit will decide its look and feel as opposed to the platform itself deciding the look and feel according to the platform's native interface.
    • What a load of crap.


      X is based on a networking concept where anyone can access anyone else's screen as a network resource. This leads to multi-threading issues as it is possible for two people to use the same desktop, even same application, simultaneously. As a result, toolkits that have their origins in that environment like GTK and wxwindows have strong multi-threading support not to mention strong networking support


      Your conclusion doesn't follow from your premise. The X *protocol* isn't the reason why GTK and wxWindows have strong multithreading support.


      This results in the base windowing subsystem's reliance on processes as the fundamental object of execution (as opposed to threads).


      What a load of crap. Processes as the fundamental object of execution as opposed to threads? Do you even know what a thread is? Every process in Windows has at least one thread.

      So toolkits built upon Windows (MFC, OWL, QT) are able to harness Windows's windowing support in a way that more easily and effectively takes advantage of the features of the subsystem.


      Yeah, whatever. QT works the same on Windows as it does on Unix.


      Attempting to port one toolkit from its home platform to a foreign platform leads to problems of "look and feel".


      Well this doesn't even have anything to do with the networking issues you raised before. It's all about how you draw the UI widgets.


      AWT and Swing are prime examples of toolkits that look strange whereever they are used.


      Idiot. AWT uses native widgets. And Swing could be made to look practically identical to the native OS. It's all about how you draw the widgets and there's not much stopping Swing from getting it pixel perfect.


      Likewise, wxwindows feels funny running on Windows and GTK looks funny. Hell, MFC doesn't even run on X.


      What about wxWindows 'feels funny'? And MFC *does* run on X, there are Unix ports. Though, why you would ever want to use a monstrosity like MFC is beyond me.
      • by Anonymous Hack ( 637833 ) on Tuesday January 21, 2003 @11:31PM (#5132781)
        Idiot. AWT uses native widgets. And Swing could be made to look practically identical to the native OS. It's all about how you draw the widgets and there's not much stopping Swing from getting it pixel perfect.

        Except when you introduce "themes" a la 99% of X users or more and more Windows users (as XP is adopted). This renders Swing more or less useless if you want the application to blend in to the rest of the windowing system.

        Additionally, Swing is still all tied up in The Way You Code It. We have an application that uses Swing but we have to force it to use the Metal/Steel/whatever-it's-called look-and-feel because we had expanded the widget set to do various other things that just Didn't Work when they were in the Windows look-and-feel. This is the reason why i coded it in AWT first, because it was supposed to run on Windows, but because Sun never fixed the bugs (i think there are still plenty in their bug database i entered that are still open or ignored) we had to convert to Swing... and now we have a weird-looking app for both Windows and X users.

        One of the KEY problems in GUI development that i see is fonts. Fonts are fucked up and all different between the windowing systems, and this was precisely the reason why we needed to implement our own widgets in Java. The names of fonts are different, the sizes they are are different, the way they're rendered is different... Yuck. We ended up having to make a flakey, probably illegal font pack for Linux, made up out of MS fonts, just to use Linux as our development platform, and even then they didn't render exactly the same (especially when we needed a widget to be a specific fixed width). From what i understand, MacOS does it different all over again. This is even a problem in supposedly cross-platform HTML too. Fonts just suck.

        I could go on forever about this, about how GTK applications look like shit under Windows (they don't "refresh" or "paint" properly for starters), most every client app written in Java that's more complex than a JDBC form looks weird under Windows, ugh. I think the original poster is conceptually correct in what he was saying. Unless MacOS, X and Windows all start using a common method to implement themes and font rendering, cross-platform GUI development is going to continue to be utter hell.

    • by joto ( 134244 ) on Wednesday January 22, 2003 @05:03AM (#5133789)
      This would be very informative, if it wasn't for the fact that it was all wrong.

      And I mean it. You would probably be hard pressed to find even one correct sentence here. For those interested, here are a couple of refutations.

      X is based on a networking concept where anyone can access anyone else's screen as a network resource.

      Wrong. Only those with permission can access it. But that would be programs, not people. For people to access the screen, they would have to physically be there, and that is no different than any other windowing system.

      This leads to multi-threading issues as it is possible for two people to use the same desktop, even same application, simultaneously

      Wrong. While many people can sit in front of one computer if it's enough space for them, that doesn't mean anything will be more multithreaded. Also, the display server will have to do exactly the same kind of resource multiplexing as it does on windows (whether the apps displaying windows are executing remotely or locally is of little difference, they are still in different threads and usually also different adress spaces).

      As a result, toolkits that have their origins in that environment like GTK and wxwindows have strong multi-threading support not to mention strong networking support.

      Wrong. Few, if any, X11-toolkits support multithreading. This is a direct result of the age of the X11 core libraries, which themselves does not support multithreading. Most everyone agrees that this is a bug, but it's also one that's hard to fix.

      OTOH, Windows was built around a single user concept, which from a networking perspective is more secure because a person's desktop isn't a networking resource (but that's neither here nor there).

      Wrong again. How do you think those Citrix farms work? Windows isn't built around a single-user concept any more than Unix is (I am talking about NT/2000/XP of course). It might be the case that your typical windows distribution is only useful for one user at a time, but the underlying technology very much supports several users. As for not exposing anything on the network, sure that makes it more secure. Nobody in their right mind allows X11 through their firewall. But windows has plenty of other security holes.

      This results in the base windowing subsystem's reliance on processes as the fundamental object of execution (as opposed to threads).

      Again wrong. XFree86 uses a simple request-response loop (no threads or processes). There do exist multithreaded X-servers however, but not for the reasons you say. Mainly, if they are multithreaded, it is purely for performance-reasons.

      Whether processes or threads are used, have absolutely nothing to do with networking, but more to do with taste, and programmer preference.

      As for windows, it uses threads. Lot's of them, so even there, you are wrong.

      So toolkits built upon Windows (MFC, OWL, QT) are able to harness Windows's windowing support in a way that more easily and effectively takes advantage of the features of the subsystem.

      I fail to see any correspondence between the "cause" and the "conclusion" here. In any case, it is wrong. On the other hand, windows is a more mature and stable GUI platform. And this is more than enough to explain why X11 GUI's generally suck in comparison (even when they are cross-platform).

      Attempting to port one toolkit from its home platform to a foreign platform leads to problems of "look and feel". AWT and Swing are prime examples of toolkits that look strange whereever they are used. Likewise, wxwindows feels funny running on Windows and GTK looks funny. Hell, MFC doesn't even run on X.

      True. However, MFC apps can (more or less) run on X11, if you want to pay enough for it, and you really need it. There are companies selling that sort of thing.

      What this all boils down to

      Well, the only thing it can boil down to, is that either you are a troll, or someone seriously likely to talk out of his ass about anything he doesn't know about.

      The final "conclusion" is obviously right, but I fail to see why you needed all the errors above to "support" it.

  • by kbroom ( 258296 ) on Tuesday January 21, 2003 @08:38PM (#5131803) Homepage
    It is hard to admit it, but when the mono team gets windows forms working correctly, C# and .NET are going to pick up a great deal of momentum, specially in the cross-platform GUI development area.
    • by SgtChaireBourne ( 457691 ) on Wednesday January 22, 2003 @02:09AM (#5133347) Homepage
      Until there is a written, legally binding agreement or guarantee that Mono is free from encumbering patents, it's best to keep at a great distance. Or else you risk ending up with far worse problems than we had with the GIF format when UNISYS decided to uncloak their patents. With Mono, Microsoft would be holding the leash. Then again, this is a company that has a hideous track record with binding agreements.

      It would seem to me that the whole reason for .Net was to port vendor lock-in to new platforms in case Windows died and also to try to compete with Java. Now that Microsoft is being forced to stop distributing a sabotaged variant of Java and to instead distribute Java as specified in the original contract, Java is even more useful.

      • ABSOLUTELY RIGHT. (I'd mod instead of post, but I just used up my points last week!) The core of .NET plus the C# language being accepted as ECMA standards will be rendered useless if MS later uses patents force licensing fees or restrictions on developers. ASAIK nothing in the core or the standards themselves is patented, but things within other basic libraries are. Since none of the "higher" libraries are standardized, they can change at any moment. The forms for example can be implemented by Mono, but since it's not a standard MS can change their APIs at any moment and still claim "open standards compliance". Once everyone's dependant on the common non-standardized APIs implemented by MS and others, if they pull tricks like changing the APIs or enforcing patent licenses we'll again have segmentation and implementation reliance. MS will play that card if they see too much of a threat.

        While the technology seems promising, we must be weary due to patents and corporate strategies. It's better to stick to non-corporate-backed open technologies in general. I personally like wxWindows for a native look-and-feel cross-platform object library. I'm fascinated, though, by the Mozilla platform as a way to serve GUIs from servers and to have apps centered around a rendering engine.
  • SWT (Score:5, Informative)

    by jaaron ( 551839 ) on Tuesday January 21, 2003 @08:39PM (#5131812) Homepage
    Okay, I'll bring it up now: IBM's SWT is great. I've been using Eclipse lately under gnome2 and it's wonderful. Nice native look and feel (great anti-aliased fonts) and very responsive.

    If you don't know, Standard Widget Toolkit (SWT) is a java GUI framework that uses JNI to call the native OS windowing API. It's an excellent example of how java can successfully be used for client desktop applications. IBM developed it for the open source Eclipse [eclipse.org] IDE.
    • Is SWT compileable under gcj (or is it gjc)?
      If so, can you compile it using CygWin?
      Also, where is it documented?

      I was looking at using SWT before I started the most recent project, but I had to decide quickly, and had no experience with it. ... Perhaps next time if I can find the documentation.
  • wxWindows (Score:5, Interesting)

    by MikeFM ( 12491 ) on Tuesday January 21, 2003 @08:39PM (#5131818) Homepage Journal
    I like wxWindows and especially it's a child project wxPython. wxPython is my favorite way to develop GUI apps because it is easy, flexible, cross-platform, and looks great. My only major wish for it is a Java port so Python/wxPython programs could be made portable to Jython. :)
    • Re:wxWindows (Score:5, Informative)

      by pnatural ( 59329 ) on Tuesday January 21, 2003 @09:04PM (#5131961)
      I've been coding for wxPython for months now. It's a great gui library, it's fast, it's portable, and it has tons of controls. It's flexible, and it's free. The docs are good, too. I cannot imagine switching to pygtk or pyqt at this point.

      My only bitch is this: the development model all but forces the programmer to reuse thru inheritance, not composition. I realize that inheritance was the preferred method of OO reuse when wx was originally conceived and written, but reusing wx types thru inheritance is painful because it leads to lots of (very similar) code.

  • Qt still wins (Score:2, Interesting)

    I like wxWindows but it's not nearly as well and copiously documented as Qt. Also, being able to build code in Linux, FreeBSD, OSX and Windows (at work) is very, very, very cool.

    Qt all the way!
    • Re:Qt still wins (Score:3, Informative)

      by dcuny ( 613699 )
      I'm not sure why you wrote "also", since Linux, FreeBSD, OSX and Windows are all supported by wxWindows. Plus, wxWindows supports just about every compiler under the sun.
  • QT convert (Score:5, Interesting)

    by RiBread ( 181983 ) on Tuesday January 21, 2003 @08:45PM (#5131858)
    I developed apps with Delphi for 4 years and was completely sold that Borland had the best solution around.

    At my new employment I had a project that needed to be cross platform. I was itching to use Kylix [borland.com], however it wasn't due to be finished for another 8 months. Looking into the details I saw that they built the corss platform support on QT.

    After checking out the QT tutorials I was immediatly hooked. QT is intuitive; I can't think of many other APIs I would grace with this description. In addition to being well thought out it has a superb implementation. I've been using it happily for 2 years.

    The only thing I miss is the strong third party component community that Delphi/Kylix has. I'm a huge fan of "buy don't build". You can really put quality touches on your app by finding the right component someone else has already made.

    -R

  • by Admiral Akbar ( 632090 ) on Tuesday January 21, 2003 @08:46PM (#5131859)
    available with Eiffel Software's [eiffel.com] EiffelStudio development suite. It's called Vision2 and provides platform independent look and feel by using a bridge pattern to separate an interface layer from the underlying implementation layer (which uses the Win32 API and Gtk+ for the platform dependent stuff).

    You can download the full EiffelStudio suite for linux (and Windows) and use it free for non-commercial software, Vision2 is included and is available here [eiffel.com], it's free!

  • Kylix / Delphi (Score:3, Informative)

    by Mr_Tulip ( 639140 ) on Tuesday January 21, 2003 @08:47PM (#5131864) Homepage
    I've used a mixture of Delphi, Kylix, HTML and PERL on a few projects. It's cross-platform, as long as you only need Linux / Windows, and the basic version of Kylix is Open Source as well as free as in beer. You can also choose to code in C++ or Object Pascal.

    Here's the link with more info: Borland Kylix Open Edition [borland.com]

    -My Karma ran over your Dogma

  • WxWindows? (Score:4, Informative)

    by Futurepower(R) ( 558542 ) on Tuesday January 21, 2003 @08:48PM (#5131877) Homepage

    What has been your experience with WxWindows [wxwindows.org]? The web site says that WxWindows provides a native look and feel on Windows, Unix, or Mac [wxwindows.org]. There are IDEs [wxwindows.org] and other tools.
    • Re:WxWindows? (Score:3, Interesting)

      by Hanji ( 626246 )
      I'm a big fan of wxWindows - really nice look AND API, but I've had trouble getting any of the dialog editors to work (I'm under OS X), which has been something of an annoyance, since, as any GUI programmer can probably tell you, implementing GUIs entirely in code is a huge pain in the ass, and is harder to change later on than if you use a resource file...
    • Re:WxWindows? (Score:4, Informative)

      by Fnkmaster ( 89084 ) on Tuesday January 21, 2003 @11:53PM (#5132873)
      I've used wxPython to build a fairly large GUI application. It was actually an annoyingly complicated project, for reasons that were not really the fault of wxWindows, and Python probably wasn't the right language to use (sometimes strong typing and compile-time type checking are really nice to have around).


      Anyway, you see a lot of Qt fans around here. Qt is nice, and is unbeatable for its documentation quality and the cleanness of extending the base widgets with new composite widgets, and extending the base objects with new behaviors. wxWindows can be a bit more awkward in these ways, isn't always quite so clean and well architected as Qt, and definitely isn't as well documented (especially if you are using the wxPython bindings - reading C++ docs with "annotations" is annoying).


      However, wxWindows uses true native widgets, not rendered widgets that look and feel nearly native (Qt - it does a pretty damned good job of it, not like Swing or something, but it's still not using true native widgets on Windows). wxWindows is also free (as in beer) for use in commercial AND Free Software applications, licensed as LGPL with the exception that derived works in binary form may be distributed on any terms you want. In other words, no restrictions on commercial use or licensing. Qt is GPLed or commercial software. Meaning you can either use a GPL-compatible Free Software license, or you can license their commercial version, which is fairly expensive (for a hobbyist or private individual - and not exactly cheap for a company if you have to buy a bunch of seat licenses for your developers).


      If you can afford it, and don't mind the fake painted widgets, then Qt is the way to go. If you want real native widgets on Windows, OS X, and X Windows, and you are on a budget, then wxWindows rules - just expect to sometimes have to bang your head against some annoying documentation or some unfinished features (wxGrid anybody? God fucking damn if I didn't build an entire app around a wxGrid only to find out it doesn't exactly work as advertised all the time... grr...).


      Most importantly, ignore the posts about how the "feel" isn't quite right on some platforms. If you really want a slightly different menu layout or some such thing for each of the several platforms, it's pretty damned easy to add a few lines of conditional compilation (for a C++ program at least) to switch a few things around - and since the joy of Unix is that X apps have no fucking standards anyway, that app you wrote that looks good on Windows will probably look just as good in X - just make sure you test the OS X version out if that's a target platform, since I imagine you need some extra work to make things truly meet the Macintosh platform guidelines. Still a ton easier to maintain one wxWindows source base than to maintain a Gtk, MFC and Carbon/Cocoa GUI separately.

  • Depends on the task (Score:5, Informative)

    by darkwiz ( 114416 ) on Tuesday January 21, 2003 @08:48PM (#5131879)
    For the kind of GUI-I-Wanna-Slap-Atop-A-Database, I like to use Tcl/Tk. Works great for programs where you just want to have something quick, rapidly prototyped AND cross platform.

    If you really want a well orchestrated OO GUI toolkit (with the exception of some nasty hacks), QT is a great thing to couple with C++. I know there are many out there that cry foul at the MOC. For the uninitiated, QT uses a macro processor to add a few keywords to C++ for their Observer(or Publish/Subscribe) pattern. I feel that these extensions are minor, and do not significantly detriment the portability of the code. That is, unless you are insane and derive EVERYTHING from QObject - then you are going to be heavily dependent on QT. In a well abstracted interface, your main code tree shouldn't contain much, if any, GUI code.

    I have a lot of respect for GTK+, but it just isn't for *me*. GTK programs do generally feel a little more responsive on slower hardware, and are generally lighter weight (being mostly pure C), but the question seems to revolve more around cross platform programs, and GTK doesn't seem to integrate very naturally with the other platforms - at least not the programs that I have seen.
    • by Greyfox ( 87712 )
      The C++ wrappers for GTK have come a long way. They make deriving new components a breeze -- just slap together something derived from the closest widget to what you need, add some hooks so you can put stuff into it and get stuff out and drop it into your favorite layout tool. The signal system is pretty slick too, and doesn't use a preprocessor. The signal system alone is worth looking at -- I could see using it in non-GUI projects.
  • FOX (Score:5, Informative)

    by barole ( 35839 ) on Tuesday January 21, 2003 @08:49PM (#5131891)
    We are using the FOX toolkit and we are happy. It is a simple toolkit, designed and implemented mostly by one person. It uses the primitive drawing routines of the underlying platform (win32 or X) so looks the same on all platforms. It is written in C++, but there are ruby and python bindings.

    The author has spent a lot of time looking at existing UI libraries and tried to learn from them before writing his own.

    See the website [fox-toolkit.org] for more info.

    • Re:FOX (Score:3, Informative)

      It should also be noted that there is an addendum to the LGPL licence [fox-toolkit.org] covering FOX that clarifies several issues. Unmodified versions of the FOX library can be statically linked to applications without causing licensing headaches, however, any changes to the library must be made available.

      This may be attractive to developers who wish to simplify the distribution of their software by statically linking in FOX, but without putting their work under the LGPL as well.
  • Is Java dying? (Score:2, Insightful)


    Swing and AWT often provide poor GUIs. Java is often slow. Sun involvement makes Java a proprietary technology. Is Java dying?
    • IBM (and others) is exerting a lot of pressure upon Sun to more fully "open" Java. At least Java has the community process (JSR, etc) for new features and so on, as well as more than one development kit vendor.
    • by Futurepower(R) ( 558542 ) on Wednesday January 22, 2003 @03:43AM (#5133608) Homepage

      Remember Pascal? At one time, Pascal was the major development language. Pascal was taught at all the universities. But, an amazing thing happened. In a period of about 4 years, Pascal died. Hundreds of thousands of people had spent millions of hours learning the particular quirks of Pascal and of Pascal compilers. All of that time was lost.

      If you have never lived through the loss of a major direction in your life, you may not even realize it can happen. The people saying I'm a troll in this thread probably haven't seen technology die.

      Remember Powerbuilder? At one time there were about 1.5 million active Powerbuilder programmers.

      No really, is Java dying? Now, I'm seeing, or think I'm seeing, the same thing with Java. The expected energy and support and standards have not appeared. Or have they? If I'm wrong, prove me wrong; I would like Java to be a success, that would simplify my choices. We bet part of our lives on our choices of specialization.

      What frightens me is that there is so little support for GUIs in Java. When programmers don't work to improve their tools, they are consciously or unconsciously deciding that the technology does not warrant improvement.

      I've seen Java programs that are unacceptably slow.

      Sun mismanagement of Java makes people look elsewhere. The world is beginning to realize more fully that proprietary means, "I'm a dog on a leash; I'll bark whenever you yank my chain; please abuse me."

      When you use Java, or any language in a way that is not fully compiled to native instructions, you give away your source code. Sure, what you give away is without comments or variable names, but nevertheless you may give away important routines. That's fine if you intend to make a gift of your work to the world; you should have the option not to do so. There has been surprisingly little work on full Java compilers; until Java has acceptable compilers, it hasn't proven itself. Is GCJ [gnu.org] mature?

      Visual Basic and Perl are written in C. Should it bother me about other languages that they are written in C or C++? Why not eliminate the middleman? Can an acceptable result for application development be achieved using something like Boundschecker [compuware.com] and avoiding pointers and using automatic garbage collection where appropriate?

      Slashdot has a moderation problem. You can't comment on and moderate the same story. So, moderators by definition moderate stories that don't interest them much.

      Bet wrong and go back to being a novice. As I write this, the parent post has been moderated Flamebait=1, Insightful=1, Overrated=1, Total=3. The question is a real and important one, not a troll. When you pick a technology, you lose part of your quality of life if you are wrong; you go back to being a novice at something else.

      If you know better, educate me. If I'm wrong, and you know better, educate me. That's the entire purpose of Ask Slashdot.
  • Java / Swing (Score:2, Insightful)

    I know I'll get beaten up for this, but how about Java / Swing? One project I wrote had to work on W2K, Solaris, HPUX, and SCO. Plus, I had to use a C library to boot. Had to develop a client with tabbed pages, trees and grid controls with drop down lists within cells. What did I use? Java with the Swing GUI library. Although it had some limitations, I was able to successfully port the app across all machines with virtually no code change! I liked the Swing architecture much more than other libraries I've used.

  • It seems that a fancy name for user interface design is "Information Architecture" [surfercentered.com].

    Usability Links [surfercentered.com]

    More Usability Links [surfercentered.com]

    Site Critiques [surfercentered.com]
  • Can't someone write an API that translates directly to native widgets on OS X, Gtk+, and MFC? Native will always win out over non-native (Apple's Safari being a recent example).

    Or would the LCD of these three platform's toolkits not be usable in any way? Are they that inherently different?
  • Qt? (Score:5, Informative)

    by Futurepower(R) ( 558542 ) on Tuesday January 21, 2003 @09:24PM (#5132105) Homepage

    Trolltech's [trolltech.com] QT costs $1550 [trolltech.com] each, per developer, for commercial use on Windows and Mac.

    QT versus Java (PDF file) [sarang.net]

    QT versus MFC, in English [freehackers.org] (See the French below.)

    QT versus MFC, in French (MFC contre Qt) [freehackers.org]
    • Re:Qt? (Score:4, Informative)

      by cje ( 33931 ) on Tuesday January 21, 2003 @11:12PM (#5132701) Homepage
      The key word there is "commercial."

      Qt is free if you're developing free software.

      Incidentally, as somebody who has used both the Free and Commercial versions of Qt, I can vouch for the quality of Trolltech's support. Any technical questions that we've had about the library have been promptly answered, bug fixes have been handled well, and they are always receptive to requests for new features.
      • Re:Qt? (Score:3, Informative)

        by vrt3 ( 62368 )
        Qt is free if you're developing free software.

        Yes, but the Non Commercial Edition for Windows is still at 2.3 while other versions are at 3.0, and Trolltech doesn't seem to have animo to upgrade the Non Commercial Edition.

    • by E-prospero ( 30242 ) on Tuesday January 21, 2003 @11:30PM (#5132778) Homepage
      Since you seem to know about Qt on Windows/Mac, I'll ask here...

      Sure, Qt can be used on Unix, Windows or Mac, but how does it achieve the native platform Look-and-feel? From the screenshots, it appears that there is are Windows and Mac themes, but how does it achieve this theme?

      Does it:
      1. Draw a theme that "looks" like windows, with behaviour managed by Qt
      2. Use system native drawing routines to draw widgets that look like native widgets, but whose behaviour is still managed by Qt
      3. Use system native widgets (actually create an MFC button), gaining the look AND feel of the native platform

      Swing, and the "redmond" theme of GTK+ do (1); even these well maintained toolkits miss minor details in their rendering of system native widgets, so they end up just looking wrong. In addition, the interactions with menus, buttons, etc differ in subtle ways from genuine system native, making applications built using them respond in an unexpected manner.

      From what I can make out, the nativeWin theme for GTK+ [neugierig.org] does (2), so it should look right, but it will still feel alien.

      The only toolkit I can think of that does (3) is wxWindows. IMHO, this is the best solution, as it ends up with a genuinely platform native look and feel. However, I haven't ever programmed with wxWindows, so I can't comment on it as a toolkit in practice.

      Under unix (1) doesn't really matter, because there IS no "system native"; as long as all your apps use the same toolkit, (vis, Gnome or KDE), you don't end with apps that feel wrong.

      So - Which category does Qt fall into? Does anyone know of any other multiplatform toolkits that fall into category 3?

      Russ %-)
      • Qt nativity (Score:3, Informative)

        by Earlybird ( 56426 )
        The answer is #3.

        On Windows, Qt uses native Win32 widgets and is fully integrated into drag/drop, clipboard, keyboard shortcuts, standard dialogs etc. Applications built with Qt, such as Psi [sourceforge.net], the excellent cross-platform Jabber client, feel perfectly native.

        On Mac OS X, Qt uses the Carbon APIs and therefore looks and feels native. However, the Mac GUI is different from Windows and Linux in several ways, most by convention, such as the placement of the menus, window resizing icon, button placement, icon look etc. Psi, for example, looks okay on OS X, but its default theme's choice of colours and icons makes it stand out like an eyesore among the slicker Aqua apps. However, it's definitely possible to create a Qt app that follows the Mac design guidelines and therefore looks and feels perfectly native.

        On Linux, Qt is the native widget provider.

      • http://doc.trolltech.com/3.1/qstyle.html

        I'd say 1 (and perhaps 2). Remeber that it is possible to configure Qt to a windows look in a X Windows environment, so I'd go for 1. If you really need to know: read the source or ask trolltech (they are usually friendly and quick to reply).

      • I don't know about Aqua, but under Windows Qt does not use the native widgets. It uses the GDI instead, in the same way that it uses Xlib under X11. Using these basic drawing tools, it creates its own look. The QButton class draws itself, and is the same identical file under all platforms. So it can't be using native widgets.

        It gets them right simply by drawing them right. 'Nuff said. It's really not that hard when you look at it.

        I've got a couple of applications written with Qt, and they look like native Win32/MFC apps under Windows. You can't tell the difference, except that they use slightly fewer CPU resources. Throw a Liquid, Keramik or Qinx theme at them under NIX, and they don't look like Windows anymore.
  • pyGTK with Glade is the EASIEST GUI toolkit. It may not be the "best" but I've built a commercial, cross platform application using it (here is a screenshot) [immunitysec.com] and I am a complete retard at GUIs. It took a total of 2 weeks - from complete scratch. Porting it to Windows for my customers is just a matter of installing a few simple .exe's - they are used to that anyways. Because the GUI is actually a .glade XML file, I don't have to write any code at all every time I change it. It just makes more sense than having to worry about integrating your entire IDE into a GUI builder!
  • by FooMasterZero ( 515781 ) on Tuesday January 21, 2003 @09:41PM (#5132199) Homepage
    For the majority of the time I create GUI's in Java's Swing API. Despite what the purists say, my experience has shown that with a little bit of fore thought and not having Swing developers rely on GUI builder tools that create some pretty bad code, a.k.a JBuilder which is a good example of this. I personally like the SWT approach via IBM Eclipse project, yet purist will most likely say that this toolkit suffere or will suffer the same quasi-proprietary baggage that people claim Swing suffers from with Sun's involvement with Java.

    However with the subject at hand, why are GUI toolkits such an issue anyways. This seems like a senseless battle that tends to reflect a typical male chauvinism of mine is bigger and better then yours so NAH !.

    I have no experience with most of the *nix toolkits as they honestly gave me no reason to start since I could never figure out which one was the most sensible to use. This is something I am sure alot of *nix developers face as they decide things like "Do we want GNOME support, KDE support, both ?" Working with MFC some they are all right of course there is not the smorgasboard of choices present in the windows world as *nix worlds. I think in Win32 for native Toolkits you are limited to MFC and QT, I could be wrong.

    So now the question is not really what toolkit is the best to use, but which toolkits can simply go away. Realistically how many different usable ways can you create a window and manipulate a window component. I ask this becuase i have managed to create very nice platform independant GUI's that work damn near identical on linux, mac, and windows and with the exception of win32 and linux since the Java Look and feels don't emulate the environment 100%. However disregarding certain things they pretty much look native.

    So if Java API's are good enough to create an abstraction layer to the native look and feel. Whats to say that idea can't be taken a step further and take the java factor out, this is similar to SWT approach. I mean seriously lets show some innovation here, instead of trying to declare on toolkit over another based on the premise that something as silly as showing a round button with gradients versus a flat rectangular one with no gradient colors.

    On a final note of this rant, a simple standard toolkit for platforms to could encourage developers to work with simpler toolkits that give them the benifit of working on multiple platforms with confidence, this way more developers more applications that are available to more people then just select few for whatever platform the choose. For those purist or XXX toolkit zealots out always remember if you have special needs that a standard toolkit doesn't provide you can always go one step further and do it yourself, i mean there is always assembly right ?
  • by MichaelCrawford ( 610140 ) on Tuesday January 21, 2003 @09:51PM (#5132245) Homepage Journal
    I'm a big fan of Andy Green's ZooLib, at:

    It draws its own widgets, but uses switchable renderers so it maintains the platform look and feel. It uses the Appearance Manager if it is available on the Mac OS. It put the menu bar in the windows on Windows and across the top of the screen on the Mac.

    It supports Mac OS (68k, PowerPC, classic and Carbon), Win32, BeOS x86 and Linux. It would not be hard to bring it to a totally new platform.

    It is in C++, is multithreaded, and provides a complete solution - not just GUI but TCP networking, file I/O, streams and persistent storagge.

    If you use it, I suggest you use the version in CVS [sourceforge.net] as a lot of work has been done since the last release. A new release is planned soon.

    I have started writing a tutorial called The ZooLib Cookbook [goingware.com].

    ZooLib is under the MIT License and the Cookbook is under the GNU Free Documentation License.

    ZooLib has actually been around longer than even wxWindows, but it was only placed into open source in the fall of 2000. Among the applications written with it is Knowledge Forum [knowledgeforum.com].

  • by Futurepower(R) ( 558542 ) on Tuesday January 21, 2003 @10:15PM (#5132359) Homepage

    One person's analysis and comparison of GUI toolkits: Why this GPL programmer didn't choose .NET [slashdot.org]
  • Excellent book.. (Score:5, Informative)

    by TheTomcat ( 53158 ) on Tuesday January 21, 2003 @10:34PM (#5132479) Homepage
    on PyQT:
    http://www.opendocspublishing.com/pyqt/ [opendocspublishing.com]

    Python: cross platform
    QT: cross platform, native-working widgets.

    QT, however, isn't free for commercial use.

    S
  • Squeak Smalltalk (Score:4, Interesting)

    by RevAaron ( 125240 ) <revaaron@hotmail. c o m> on Tuesday January 21, 2003 @11:26PM (#5132765) Homepage
    I know people won't be into this, considering the crowd here, but all the same:

    I use Squeak Smalltalk as my cross-platform toolkit of choice. Squeak includes a cross-platform GUI toolkit, as well as a cross-platform language, IDE, runtime and configurable world of libraries. Once you get out of the rut of Tk, GTK+, etc and get used to the programming style, it makes so much sense, it's almost scary. I was doing Python+(Tkinter or wxPython) before Squeak.

    What most people here will gripe about is that Squeak's GUI system, Morphic can't be called from C, C++ or Perl at this point. It's possible, but so far our users have been happy enough with Smalltalk not to move away from it. Squeak also has it's own UI look and feel- it's not Windows, Mac OS, or GTK+ in appearance. I may be in the minority, but I prefer a clean look to poorly emulated widgets. By default, the look and colors are a bit kidsy, but like everything in a Smalltalk system (ala emacs, but easier!), it's very configurable.

    Squeak supports a lot more platforms that most of the combos mentioned here. Right now, Squeak supports: Mac OS X, Mac OS Classic (System 7 - OS 9; m68k and PPC), Windows >= 95, DOS, WinCE (StrongARM, XScale, MIPS, SH4), X11 on any modern Unix-like, Linux framebuffer (Linux PDAs and kiosks), SDL (lending support to PicoGUI and others), OS/2, and the Acorn RiscOS. It also runs on bare hardware on stock x86 machines, complete with drivers written in Smalltalk. There might be more, but that's should be most of them.

    No, I would reccoment it to people who are wanting to create a business app for a homogonized work environment, but it has many uses.
  • by zefnd ( 603219 ) on Wednesday January 22, 2003 @02:02AM (#5133323)

    First, a shameless plug: I'm working on a couple of C++ applications that are currently using FOX [fox-toolkit.org] for the GUI (and other parts). The first one is a front end to the open source stats language R [r-project.org] and it is called Obversive [sourceforge.net]. This is the most active project, but it is still real tiny. The second project is a little chat client I'm writing called Bombyx [sourceforge.net] which will work on the SILC [silc.net] and hopefully IRC. In addition to Bombyx, I've also developed a little GUI generator with Lua [lua.org] that makes FOX widgets pretty quickly. It's called GIG and you can get it from the Bombyx site mentioned previously. The intention with GIG is to make it work for any toolkit, but right now it does FOX only.

    When I was working on these projects, I went through a huge number of toolkits and actually tried developing fast "mock-ups". My test was to see if I could get the first window I wanted in each project using available resources. If that worked, then I would try a couple of other windows. I also reviewed the designs of each and then went with what worked best at the time.

    Here's my review of each of the toolkits I used. These are just my opinions, but they are based on actually using them in various platforms (or trying to).

    FOX [fox-toolkit.org] After all of this evaluation, I found that FOX was pretty much the best at the moment for clean, simple GUI building. It has pretty good docs (way better than wxWindows), and is fairly natural for coding. It also has some nice language bindings for various languages like Python [sourceforge.net], Ruby [sourceforge.net], and Eiffel [sourceforge.net]. It doesn't have quite as many controls as wxWindows, and it doesn't work natively on as many platforms, but it is much easier to build and work with and much smaller. If you are porting a Windows application to another platform, you will probably be better off with wxWindows since they try to mimick the API design as much as possible (and of course, all it's problems too). Also, if you hate macros then you'll have a problem with FOX (and wxWindows too). A testimony to how easy FOX is comes from Obversive, where one developer had no C++ or FOX experience and has already created several complicated controls. Another developer has good C++ skills, but only worked with KDE previously. He not only developed an excellent Twin Table control, but also added lots of great features to it and in very little time.

    FLTK [fltk.org] I did the original work on Bombyx with FLTK. FLTK is a nice library, but it was just missing too many widgets to be useful. It was also rather buggy and it was a real pain to do delegation. There are, however, two really nice things about FLTK: no macros, excellent GUI builder. One of huge problems with ALL other toolkits I've ran into is that, when the developers start to make their GUI builder, the decide they need an entire IDE. I already have one thank you. I doubt some OSS project is really going to out-do my tool chain right now, especially if it's also working on the widgets. Just give me a simple builder please. FLTK got it right with FLUID--their GUI builder. It's real easy to use, super fast, and does one thing well: build interfaces. It was a little weird at times, but I checked out the latest and it worked great. Also, FLTK does not use macros for messaging which is nice for the C++ purists.

    Cocoa I love Cocoa, but, Apple made a huge mistake by making it a MacOSX only beast. I think Apple could rule the world if I could spend my time writing my apps with a nice UI, great tools, and an easy language (Objective-C), and then click a button and have a Windows, Linux, HP-UX, and Solaris binary. You could do this with the original NeXT stuff, but Apple crippled Cocoa and friends. So, I reserve Cocoa for other useless programming that I only do on my MacOSX. There is GNUstep, but I couldn't get anything to work with it, and half the fun of Cocoa development is using Interface Builder (IB). BTW, IB is another GUI builder that is excellent, and also does just GUI building. Let's hope the wxWindows guys figure out this pattern and write a small GUI builder rather than their entire IDE which nobody seems to be able to compile but three dudes inside the cabal (sorry, it really burns me).

    wxWindows [wxwindows.org] I must say that wxWindows has a ton of nice widgets (I may steal their HTML widget) and works on a huge number of platforms. But, I kept getting burned in three areas: docs, dependencies, and bugs. Their docs are horrible. You have to hunt around the net looking for tutorials which are not very good anyway. Half the example applications in the distro don't even work so you can't rely on them, and it's just really hard to figure out what to do. I also hated having to add a billion other libraries to my build just to get wxWindows to work. I found it a problem when linking my application took longer than compiling all the files from scratch. Finally, just about everytime I went to use some widget, I found some bug or limitation that made it unusable. They have improved quite a lot from what I have heard, and people really rave about it, so I think everyone should give it a try. One thing also that annoyed me about wxWindows is that it does not support delegation very well. All the other toolkits I used either support delegation easily or practically require it. In wxWindows, I spent the better part of a week just trying to get one simple delegation design working and couldn't do it despite lots of help from people on various IRC channels. To me, things are broken if I have to subclass every time I want a widget. The wxWindows XML based resource files are supposed to fix this, but I won't hold my breath.

    JFC/Swing [sun.com] The original version of Obversive was done in Swing with lots of other goodies. Java is my primary work language, and I really wanted to use it on the Obversive project, but we just kept running into performance problems. Frankly, Swing is just a P.I.G. and is really hard to code. None of the GUI builders available we tried proved to be that useful, and eventually we dropped it becuase it was just too huge. Ironically, we were able to prototype an almost complete GUI using FOX which runs on Linux, *BSD, Windows, and MacOSX (through the XDarwin or Apple X ports) in about 3 weeks time. This was mainly in part due to the slick design of FOX and simplicity, and partly in part because of the GIG code generator I put together. Oh, and we looked at SWT, but balked at the Linux or Windows only (and the fact that the flagship, Eclipse, ALWAYS crashes on Linux does not make me happy).

    So, that's my experiences with these toolkits. I hope that helps answer the question, and I hope the reply wasn't too long. To summarize: Use FOX if you need C++ and good design. Use wxWindows if porting from MFC or if native controls are important. Use Swing if speed is not a problem, but cross platform really is. Use Cocoa if you only care about MacOSX and need to get something out quick. I actually prototype some UIs in Interface Builder on MacOSX, which says a lot.

  • by josse ( 132309 ) on Wednesday January 22, 2003 @03:31AM (#5133578) Homepage
    I have been using Qt for the last 1.5 years to develop an application for post-processing of segmented (medical) image data as part of my master thesis. The application is available under the GPL at sourceforge [sf.net]

    During development one major disadvantage of Qt has surfaced, and I think it shows that the Trolltech has choosen a terribly wrong solution to a complex problem.

    In order to support their signals-and-slots mechanism (which is an elegant concept, and allows for easy implementation of both the model-observer pattern and the mediator pattern) they have added two new keywords to the language, namely signals and slots. In order to support these you _HAVE_ to run a preprocessor called moc (Meta Object Compiler) for your program to link. But moc does not support templates. [trolltech.com]

    Mostly we have managed to work around this limitation by having a non-template superclass which declares the signals and slots (luckily slots can be virtual) and then have the template parts in a subclass, but this leads to unnatural class hierarchies.

    Other libraries have managed to support a signals-and-slots mechanism without such an ugly hack. Both Boost.signals [boost.org] and libsic++ [sourceforge.net] implement them. However their syntax is not as nice as Qt's. If C++ really need even more syntax is of course another question :-)

    While not all applications rely upon templates, they have some interesting uses, and if an applications first starts to use them, most classes easily ends up as template classes. See the book Modern C++ Design [amazon.com] for "new-school" uses of templates. This could easily be the direction C++ development is headed, and it's a shame Qt will not be able to be a part of it.
    • During development one major disadvantage of Qt has surfaced,

      The alternative you're so enthusiastic about also has a "major disadvantage".

      and I think it shows that the Trolltech has choosen a terribly wrong solution to a complex problem.

      No it doesn't. It shows that you don't understand why they chose to design it that way. The loose coupling between componenents is a feature. The dynamic object model used by Qt is a feature.

      Mostly we have managed to work around this limitation by having a non-template superclass which declares the signals and slots (luckily slots can be virtual) and then have the template parts in a subclass, but this leads to unnatural class hierarchies.

      Hiding parametrization is a necessity if you need to support a dynamic object model. There's nothing "unnatural" about having a superclass for a family of template classes. Doing this sometimes is a useful way of hiding template code, and reducing code dependencies between translation units.

      Other libraries have managed to support a signals-and-slots mechanism without such an ugly hack.

      Using a different ugly hack instead. How do you dynamically load objects using the boost/libsic++ template model ? It's a more static model, and that has its disadvantages -- code is more tightly coupled (because classes need to know more about each other), and you get all the usual template overhead. Qt behaves much like an interpreted language, it is very flexible. You lose that with a static template model.

      While not all applications rely upon templates, they have some interesting uses, and if an applications first starts to use them, most classes easily ends up as template classes. See the book Modern C++ Design [amazon.com] for "new-school" uses of templates. This could easily be the direction C++ development is headed,

      Templates are useful, and they're certainly helping give speakers/writers something to talk/write about. But the world is bigger than templates. They are powerful, and useful if used judiciously, but the thought of trying to actually compile an application where most classes "end up as tempalte classes" is fairly scary. Templates are a powerful tool, but the power comes at a price. Simply put, one should not claim that "the answer is templates" without first understanding what the question is.

  • by raboofje ( 538591 ) on Wednesday January 22, 2003 @04:04AM (#5133654)
    Not only is it stable and complete, I'm pleased that wxWindows is under ongoing active development in the Open-Source tradition.

    The mailinglists are, though high-traffic, very informative and the atmosphere is friendly (hardly any flames, 'dumb' questions are usually anwered with 'check the docs at ....' instead of 'RTFM, you dumbass').

    Though the bulk of the wxWindows code is written by a small group of core developers, the development process is very 'open': decisions are often made based on discussion on the mailinglists, and patches usually well-appreciated.

    As with QT, wxWindows is also very much worth considering when developing single-platform or even non-GUI applications (check out the wxBase port).

  • by viktor ( 11866 ) on Wednesday January 22, 2003 @05:35AM (#5133874) Homepage

    As I read the question, it was about a cross-platform toolkit with native look-and-feel. I definately interpret this as being native to the platform where it's run, not native to the toolkit! Otherwise the statement would be meaningless.

    The discussion has, as usual, talked a lot about Tk, which has it's own look-and-feel and therefore certainly not is native. Qt is cross-platform, with applications that look native, but necessarily aren't.

    There's more to a platform's look-and-feel than how the buttons look. The location of the menu-bar is one example. The placement of OK/Cancel buttons another, and standard quick-keys a third. Mac OS X has GUI guidelines which specify how far apart different controls should be, and they are almost guaranteed to not match KDE's guidelines.

    Mac OS X/Cocoa also has the concept of sheets, which are basically modal dialogs attached to one certain document window in an application. There's no similar concept in e.g. Gnome, and a toolkit would therefore be hard pressed to find a replacement within the native look-and-feel. In fact multi-document applications in their entirety are differently handled on Windows, Linux and Mac. And I don't even think Gnome and KDE agree on all details of look-and-feel.

    Cross-platform with native look-and-feel is therefore a lot more complex than just using Qt or Tk. What would really be needed is actually a way of abstracting away the GUI part of an application entirely, basically making the entire presentation into a Stylesheet of sorts, somtehing like what you do to strings and numbers for i18n/l10n.

    But I haven't seen any real efforts to do this. It might work without it for Linux vs. Windows, because neither have very strongly enforced standards on look-and-feel, and you can therefore get away with doing things almost right (or even doing them wrong).

    • Mac OS X/Cocoa also has the concept of sheets, which are basically modal dialogs attached to one certain document window in an application. There's no similar concept in e.g. Gnome,

      Actually both X (or X Window Managers) and Windows support the idea of "child" windows that belong to a certain parent window. In fact this is about the only way to keep one window atop another. On both systems hiding the parent window makes the child window disappear, and showing it again makes the child window reappear. Also (for Windows and most X window managers) the child windows have no iconize buttons of their own and cannot be iconized seperately. Sheets match pretty cleanly onto this.

  • by Spunk ( 83964 ) <sq75b5402@sneakemail.com> on Wednesday January 22, 2003 @09:39AM (#5134897) Homepage
    Isn't that like a bar that plays both types of music: country and western?
  • QT Rocks (Score:3, Informative)

    by WPIDalamar ( 122110 ) on Wednesday January 22, 2003 @09:40AM (#5134899) Homepage
    We've been using QT for Mac & Windows for a while now, and it rocks!

    Also, if you're looking for a job doing QT development, we're hiring!

    check out
    http://www.tomsnyder.com/about/au_work_depts.asp?D eptID=PROD [tomsnyder.com]

  • by rrwood ( 27261 ) on Wednesday January 22, 2003 @11:48AM (#5135959) Homepage
    I posted the original question about cross-platform GUI toolkits, for whatever that's worth.

    After much investigation, I've concluded that they all suck a little bit in different ways, and that there is no absolutely "right" answer. Since each has strengths and weaknesses, you have to look at the platforms you are trying to hit, and choose accordingly.

    That said, I have to say that Qt is very nice in terms of its polish, documentation, user community, and support of Mac OS X, Windows, and X. The only downside I see there is that they emulate the look/feel on the target platforms, rather than using native widgets, and they don't support Mac OS 9.x and earlier.

    For my project, my choice is wxWindows, which uses native widgets and supports Mac OS 9.x as of the latest wxWindows stable release. wxWindows has a great user community, has reasonably okay docs, and is pretty simple to get up to speed with.

    Oh-- one other option that I have not investigated for a long time is CPLAT [ksoft.net]. It also looks quite nice for all the same reasons as wxWindows, though CPLAT is far less well known.

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (10) Sorry, but that's too useful.

Working...