Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
X GUI

Why Are Modern X11 Tookits Not Written For Xt? 10

Vinodh D Rajan asks: "Being fed up with the disparate look and feel among the Linux toolkits and incompatibilities between them, I recently started studying the user interfaces available under Linux, something I called The Unified Linux Desktop. For this I started studying how GTK+, QT, FLTK, GNUstep, Motif, Xaw, etc all work. The more I studied them, the more I wondered as to why modern tookits are not written against the Xt standard, since it is the one that has been standardized. Since Motif has been so successful, why not spend effort trying to improve it and provide a common framework for component development, instead writing incompatible toolkits?"

"I am sure that any inadequacies in Xt can be improved. Projects like neXtaw dramatically improves Xaw look and feel. Why not just develop the standards instead of developing newer stuff that is incompatible with standards. Besides the way GTK+'s object system works, seems almost similar to Xt's object system. Apart from cross platform development concerns, what made GTK+ developers write their own subsystem instead of using Xt."

This discussion has been archived. No new comments can be posted.

Why Are Modern Tookits Not Written For Xt?

Comments Filter:
  • Futhermore, this documentation and the man pages for the Xlib/Xt API are NOT very good.

    Just to play devil's advocate for a second:

    leto:~% man gtk_window_new
    No manual entry for gtk_window_new
    At least Xt *has* man pages. Sure, there's plenty of HTML documentation for gtk+, but when you're in the middle of a coding session and you can't remember the arguments to a function, suspending and reading the man page is a lot less hassle than firing up a web browser and navigating to the right page. Qt used to have the same problem, but I believe there are now man pages for Qt classes and member functions.

    The main problem with Xt, though, is not the documentation. It's the fact that it's not sufficiently abstracted. You can't sit down and write a standalone Xt app that does anything meaningful. You need to know raw Xlib as well in order to do the things that Xt can't. When you add Motif into the equation, things get even worse. You need to know all three. Looking at the X books on my shelf, that's several thousand pages of documentation that you need to know about before you can write anything useful. Both gtk+ and qt let you write an application without having to know about the underlying Xlib layer. If you've ever had to do any Motif or Xt programming, you'd know just how big a benefit that is. I'm just glad I don't have to do it any more...

  • (quick note to moderators: this is not intentionally inflamatory)

    I've been programming for lots of years now. I've done Amiga programming. I've done Windows programming. I've done Mac programming. I've done Unix/Linux console programming. I've even done CFX-9850G programming (it's a seriously overpowered Casio calculator).

    However, nothing prepared me for what to expect when I delved into X-Windows programming. It was absolutely disgusting. Before I go any further, let me make a few points:
    * Yes, I understand most of it
    * Yes, I understand it was designed with a clear separation between display and application (server/client).
    * Yes, I use 8-space tabs.

    The executive summary: X11 is bloated like a goldfish after eating a crocodile.

    I admire the extreme flexibility of X. I admire the degree of control of X. But I absolutely detest the extreme fatuousness (kids, use a dictionary, or ask your parents!) of the whole protocol.

    This may, at first, seem off-topic. However, you should stop and think for a moment. Is everybody barking up the wrong tree? Am I a console-using lunatic? Is it important for a monarch to know the land speed of an African swallow?

    David.
  • That was the whole point... X11 *is* bloated. Even if you use GTK/QT/whatever, all the X11 mechanisms are still being run; they are just abstracted from the programmer. IIRC, X11 was designed in the 1980s... it hasn't changed that much, since there's too much stuff depending on it.
  • My guess at why Xt isn't so popular is the documentation. There is almost no good tutorials and reference for Xlib and Xt around the net. You need the books. Yes, there is the library reference, but it's a postscript file and very hard to find. The hypertext was invented after the documentation was written, and the docs hasn't been updated. Futhermore, this documentation and the man pages for the Xlib/Xt API are NOT very good. It assumes that you know the basics - and for that you need the books. A showstopper for many + making it hard to make a quick hack.

    Another reason may be the structure of the API itself. It's rather complex. Not much is "default" until you choose otherwise, as in Gtk+. Instead you have to make all the decisions about the properties of a window before it can be displayed. Again, a showstopper for quick hacks.

  • If modern toolkits were written for Xt, they would have a much harder time porting it to other platforms. Both Gtk+ and Qt runs on Windows, and directly on framebuffers which make them a viable solution for embedded devices. You wouldn't want to run a full bloated X11 on your Palm, now, would you?
  • There are several reasons why toolkits such as GTK+ and Qt aren't based directly on Xt.

    1. Xt's API is awful (so is Motif's by extension). It forces you to explicitly deal with a lot of low-level crap that should be handled automatically through defaults or under-the-hood behavior. Xt doesn't have enough functionality by itself to build decent GUIs, it needs help from a higher level toolkit like Motif.
    2. As a correllary, Motif was non-free for years. Most Linux users didn't feel the need to fork over hundreds of dollars for Motif, when they could accomplish their tasks without it (crudely with just Xt and Xaw). For a while, Motif was superior to the free tools, but Qt and GTK+ have now left Motif in the dust. Even though Motif is now free, nobody wants to bother with it now that they have moved on to better things.
    3. Xt is slow. Qt in particular makes calls directly to Xlib (the lowest level interface to X) instead of going through Xt for performance reasons. I'm not sure about GTK+ & other toolkits.
    4. Both GTK+ and Qt are great improvements over Xt+Motif. They're easier to program to, less buggy, have more functionality, provide more consistent GUIs and are much faster.

    The only possible reason to use Motif/Xt is to deal with legacy applications.

  • X11 is not bloated. it just provides a LOT of low level interfaces which can be a *fucking* pain to deal with. Consider the following example : im using XImages and reading writing from them. my proggie crashes in most linux systems but works with SGIs perfectly. why ? cos the color visual defaulted to in linux doesnt allow overlay modes for most cards (this is xf86 4.x) and default is truecolor which is readonly. i mean..WTF ? why doesnt the godamn X server have an autovisual selection capability ? cos X11 is too low level to deal with it. now take the GTK which allows you much less control but defaults to an intelligent visual overlay. that hides the inherent painfulness of X but causes other problems. ever notice netscape segfaults or gnome inverted if you switch to directcolor 24 bit instead of truecolor ? try it and learn. bottom line is that its not X11's fault..just that the protocol is not at a high enough level to deal with the regular real life weirdness in different systems.
  • by ikekrull ( 59661 ) on Saturday February 10, 2001 @05:01PM (#441101) Homepage
    I dabble with C, Java, Perl and other languages.

    I am a 'child of the internet' when it comes to programming - i.e everything i know about computers and programming i either learnt from the net, or from books I bought because i wanted to expand the knowldege i gained from the net.

    If i had gone to university, maybe i would have been exposed to Motif, but since its a Windows world out there for most of the youth today, theyre going to look for something more immediately similar to the Win32 API.

    When i look around the net for information, there just isn't anything obviously useful for Motif - You can get so much more done, so much faster, if you use the amazing open-source technologies like GTK+, GNOME, Qt, SDL etc.

    Since Motif has been opened, we might see more, but from my point of view, Motif is a dead horse (an ugly dead horse at that), which i simply see no need to bother with. If you have a huge, existing application that uses Motif, then you probably want to persist with it, but if youre starting fresh, why would you use Motif?

    The question really should be 'What does OpenMotif bring to the table for the open source developer compared to the existing standards like GTK+ and Qt?'

  • Until last year, Motif was closed software. This is just a guess, but I think the most likely possibility is that people were trying to develop these alternative toolkits, then when motif was open-sourced, they were so far along, that they just continued developing them.

    Of course, this is just a guess, and if anyone can correct me, please go ahead.

    -mdek.net [mdek.net]
  • The other day I sat down and decided to learn Xlib on a Sun from nothing but the man pages. So far I have a program that opens a windows and prints Hello World. From here, most other drawing related tasks are easy. I still haven't figured out getting events, but I haven't even looked at it yet since I just wanted to draw to a window for visualization purposes. Despite how low level Xlib is, it really was pretty easy to use.

    Motif on the other hand is a real pain in the ass. I took one look at Motif on an SGI and decided to download and install GTK. It was really ugly. The only thing I know about Xt is that those two letter pop up a lot with Motif.

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...