What is the relationship between CDE and Motif?
|
6-Dec-00 17:00 GMT
|
In order to answer this question, we should go back and
look at the original window manager, mwm (the Motif Window
Manager), and consider the services which it provided, and
look at some of the problems with the implementation. In
looking at the issues, we will then see why the Common Desktop
Environment (CDE) came about.
Mwm was a layout manager pure and simple. Its primary
concern was simply to configure the stacking order of the
applications on the screen, and to ensure that the focus was
correctly distributed amongst the various programs as the user
switched context between applications. It did not concern
itself with consistency of appearance: each application was
entirely free to choose whatever appearance it sought for
itself, and no attempt was made to coordinate the defaults for
any of the running applications.
Part of the problem was the Motif toolkit as originally
written: it made no attempt to rationalize appearance across
the various applications which concurrently occupied the
screen. Such behavior which it provided in the toolkit were
basic to say the least: since the default toolkit background
for certain objects was a not particularly appealing shade of
blue, this meant that most application programmers would
automatically assign new default colors to their application.
Naturally each programmer might well consider such issues as
the number of available colors supported by the hardware, and
attempt to optimize the color usage of the program to hand.
But none of this was coordinated: each application would
provide its own defaults, and although each might be optimal
in terms of color usage in its own terms, taken together with
other applications on the screen it was still entirely
possible to run out of colors or indeed other scarce
resources, perhaps to overload the X server with an
inordinately large array of fonts. The effect could be rather
more than cosmetic if the appearance of certain controls like
toggles, buttons, and so on, differed widely across the
running applications: to a novice user, these subtle changes
could be the source of confusion.
Of course, the user could specify some default colors or
fonts in their own X defaults files which would in principle
apply to all applications. In practice, since each
application generally provided its own defaults, and since
configuration of X resource files is not a particularly
unsophisticated task, asking the user to address the issue of
coordinating sensible defaults for all applications is a
distinctly sub-optimal solution.
Added to which, when Motif first appeared on the scene,
the paradigm for the desktop was less sophisticated: there was
no notion of the virtual desktop, with its multiple rooms or
whatever, which make the logical space on the desktop larger
than the physical parameters of the display hardware. When
mwm was first around, we were used to a scheme of working
where we would have a few applications on the screen; we would
generally finish one task before proceeding to the next,
although there might be some multi-tasking going on. This was
partly a result of moving over from dumb terminals: there, we
might have had several tasks running in the background, but
the foreground contained the interface of a single
application. Changing to a windowing environment involved a
change in mind set, and these things take time. In the (as
then) new windowing environment, the screen would not be
cluttered with long-running background tasks like mail
programs which nowadays we tend to leave on the screen all
day, along with whatever else we are doing. The screen
certainly did become cluttered as we got used to the
environment, and became more adept at holding multiple
application contexts in our minds at the same time.
Which is where the CDE project comes in. There are two
aspects to CDE. Firstly, there is CDE Motif, which is a set
of enhancements to the Motif toolkit which provide hooks,
generally implemented at the XmDisplay and XmScreen level,
such that the general default appearance of an application can
be set so that it overrides some of the defaults which the
application might like to assign to itself. And secondly,
there is the CDE desktop manager. This provides the
multi-room capability which is absent from mwm, as well as
implementing things like style-manager programs so that the
user can set the default colors, fonts, and so forth for
all applications on the screen. Furthermore, the CDE
project was a collaborative venture involving some of the more
well-known operating system vendors (Sun, HP, SCO, IBM, Dec
(Compaq), etc), so that the whole project also had something
of a cross-platform aspect to it: it ensured a degree of
consistency to the desktops across all of the vendor
platforms.
Although the basic design goals were known and agreed - a
multi-view virtual desktop which controlled the resource usage
of all applications in a consistent manner - the
implementation details were sometimes not consistent. Certain
things were not agreed on, like how far do you go to enforce
the consistency of color usage, and whether the effect of
changing the default desktop colors is dynamic or static in
effect. Other platforms in parallel to the CDE effort
implemented similar themes using the Motif toolkit. For
example, on SGI platforms, the Schemes mechanisms are
implemented in a different way to CDE on Solaris. Whatever
the implementation, sometimes changing the default colors has
immediate effect on all running applications, at other times
the new defaults only take effect when an application is
started. Then again, changing some aspects of default
appearance might take effect only if you restart the desktop
manager itself. These details of the design are variant. The
SGI Schemes mechanisms really pre-date CDE, although some
effort was made to provide a level of consistency. Schemes
do, however, address the same issues as CDE.
So to summarize, CDE should be viewed as an enhancement to
the original Motif specification. It addresses the
limitations of the original design by coordinating the
resource usage of the multiple applications concurrently
running on the screen. CDE Motif is simply Motif which has
the extra hooks (resources) that allow the CDE window manager
to set defaults for the application. Applications built under
CDE Motif will run perfectly happily in a non-CDE environment:
all that they lose is the connection with the CDE style
management system.
Sponsored
by X-Designer - The Leading X/Motif GUI Builder
- Click to download a FREE evaluation
Goto top of page
|