my experiences with Xview; Xview vs. widgets

Laurence R. Brothers quasar at ctt.bellcore.com
Sat Dec 23 02:45:23 AEST 1989


This posting is actually in response to a query on comp.sys.sun.  I want
to put three things up front here:

1) Disclaimer: What follows is personal opinion and has nothing to do with
any position taken by Bellcore; indeed Bellcore is not permitted to voice
opinions on products, and I can think of any number of different opinions
among my coworkers.

2) Asbestos: Despite my position in favor of Xview and against widgets, I
am bending over backward to treat widgets fairly. I would like to be
convinced that widgets are superior to Xview, since more people use
widgets of various brands.

3) Note: I haven't used any other X programming approaches, for example,
Interviews, the Andrew stuff, or raw Xlib.

Now then.

I have used Xview to construct a complex front-end to a combination
expert-system/software-technology/CSCW system. 

I find Xview to be a fairly pleasant programming environment, considering
that Sun seems to have their greek letters one step off.

In other words, the alpha-version was utterly unusable, the beta version
had lots of bugs, like what I would call an alpha-version, and the 1.0
first-customer-ship version still has bugs, and doesn't support all the
intended features. I anticipate 1.1 being a really good environment....  I
note that the average comp.windows.x posting is about someone's trouble
with some kind of widget, so widgets are hardly perfect, either.

Anyhow, the CSCW aspect of my system demanded either a whole lot of
messing with network sockets and IPC, or implementation via X, so my
obvious choices were some brand of widgets (intrinsics) and Xview.

I have no beef with the hierarchical organization of widgets, the ability
to subclass and write new widgets, and their overall logic, but I find the
actual API *EXTREMELY* painful. I feel real distaste for the argument
buffers of widgets, and I find geometry management that cannot be
overridden highly unpleasant.

I was able to become fairly adept at Xview inside a week or two. From the
experience (admittedly less) I've had with playing around with Athena, HP,
and Motif widgets, I think that it would take me five to ten times as long
to gain the same level of skill, and that programming with widgets would
always take longer than with Xview, given equal levels of skill. On the
other hand, there may be some things that widgets can do that Xview can't.
Certainly the reverse seems unlikely. (Except: Can widgets allow you to
open multiple displays on different machines simultaneously? Xview 1.0
can't, but the next version is supposed to).

Esthetically, Xview seems to be a lot more parsimonious, compared to
widgets; you can go quite long way in Xview with less than 10 Xview
functions, whereas you seem to need 10 different ones in intrinsic-based
programs just to create your first widget.

On the other hand, widgets seem to be more flexible in principle.
Personally, I don't find writing widgets to be easy, and am satisfied with
the flexibility of Xview, but that might change if I found a direction I
couldn't take Xview.

I'd prefer a higher level API interface to widgets, because I find
actually programming in them so unpleasant. I still don't understand why
there isn't a varargs approach to the damn arugment buffers. A brief look
at UIL does not impress me, though. I still don't understand why there
isn't a varargs approach to the damn arugment buffers.

It is apparently fairly easy to descend to Xlib calls in both Xview and
widget -based programs; in Xview you tend to do this in an Xview canvas,
where you can use any kind of X drawing routine.

I note that a lot of the displeasure expressed on comp.windows.x has been
with Sun's publicly released alpha-version. If that were my only exposure
to Xview, I'd think it was terrible too. I think it was a serious mistake
for Sun to release alpha-version code.... Anyhow, hopefully the R4 tape
will be better.



More information about the Comp.sys.sun mailing list