return to first page linux journal archive
keywordscontents

Toward Greater Portability: A Quixotic View

A fun way to look at the issue of the development of a universal GUI.

by Graydon L. Ekdahl, Ph.D.

Don Quixote: Ahhh, Sancho, think of it! A single GUI interface that would allow me to write my application once and then run it on Windows, OS2 Warp and Linux boxes without changing one line! Maybe even on Alpha and Sun boxes too.

Sancho: But Master, no one can agree on anything. Especially the big embarcaderos. And if they did agree on something like that, it would only be after a hundred years. Or maybe longer. Then I sleep in the earth. May I rest in peace.

[Sancho sometimes transmogrifies vocables when he speaks. It is not clear exactly what he means by ``embarcaderos''. The meaning probably lies somewhere within the semantic turf demarcated by the concepts ``entrepreneurs'', ``big guys in business'', ``movers and shakers'', or the concept of your choice that denotes mercantile power, grandeur and a touch of narcissism.]

Don Quixote: Have you forgotten the great examples of cooperation? The ones that made computing easier? What about the LIM memory specification? Three giants--your embarcaderos--created one method of accessing memory above one megabyte so that programs could be bigger, faster.

Sancho: Careful, Master. One of the last giants was a windmill.

Don Quixote: Sancho, it was a giant. And remember: I am your master.

Sancho: But Master, just one example. Once is an exception. Proves nada! Twice is a coincidence. Also proves nada. Three times is a pattern. Give a second example!

Don Quixote: You doubter! You miss the best in life because you look down, not up. You overlook great things to discover only the pebbles in your own shoes.

Sancho: Please, Master, the example. A poor man like me does not go far on words and ideas. Please, something concrete!

Don Quixote: Sancho, Sancho! What about STL, the standard template library? Now we all have containers that can be used with almost any ANSI compiler! We cooperated on that! What about the committee that drafted standards for C++? Knights from all over the industry came together. These are great achievements.

Sancho: All right, Master! STL and ANSI standards are both C++. You get credit for one example only. Nothing more. That's number two. So now you have a coincidence.

Don Quixote: Have I made my point?

Sancho: No!! You give three good examples, or I believe in nothing! Nada! Nada!

Don Quixote: Sancho, Sancho, so pedestrian, so little imagination. I fear for your salvation.

Sancho: Master, the example, please!

Don Quixote: Think of Java. Here we have something like the ideal I am thinking of. We write once, we run many. Why? Java is interpreted code. And the interpreter is written for the platform. The application is written for the interpreter. So we run on all platforms.

Sancho: Oh, Master! If Java is interpreted, Java is slower! Slower is not good. Faster is good.

Don Quixote: Exactly! For once you have something right. We need performance and portability.

Sancho: But Master! Where is the cooperation? Sun Microsystems created Java.

Don Quixote: You miss the point. Sun did cooperate. They licensed Java to anyone who agreed not to provincialize the language by creating non-portable, local extensions. Most people respected this agreement. Java was not theirs to take over anyway. So Java is portable, mainly.

Sancho: Master, Master! What is this ahead?

[Sancho and Don Quixote have just reached the crest of a hill, and looking down the other side, they spy a bridge over a small brook. Next to it stands a sign: ``Bridge to Cross''. Just as they approach the crossing, a Proprietary Troll jumps up from below the bridge onto the road, barring their way.]

Proprietary Troll: I control this bridge, and you must pay toll, or you may not cross.

Don Quixote: Sir, I am a Knight, champion of Dulcinea del Toboso and future keeper of the universal GUI interface. Let us pass, sir!

Proprietary Troll: I control this bridge, and you must pay toll. Heed my words, or you will fare badly.

Don Quixote: Indeed! What will I lose?

Proprietary Troll: Market Share, my Knight, market share!

Don Quixote: [suddenly thoughtful] I see. And what toll do you desire?

Proprietary Troll: Control!

Don Quixote: Of what? You mean the GUI interface? You want to control that too?

Proprietary Troll: That most of all. That is your toll. Give it up, turn it over to me, or you will not pass. I control the bridge, I control the interface and I control you.

Don Quixote: Not so fast, you runt!

Sancho: Master, Master! You forget yourself!

Don Quixote: You forget your bridge is just one miserable, narrow crossing, that your brook is just a tributary of one great, massive stream whose power sweeps us all along, that you can simply be washed away if you fail to meet the needs of travelers who come this way. You overreach yourself! Say, aren't you a little far from Scandinavia?

Proprietary Troll: [puffing himself up and then expelling a lot of hot air] Try to cross without my help. Lose market share. We will see who is swept away!

Don Quixote: Canis culum in tuo naso! We will find another bridge and cross elsewhere. We do not need you to provide a crossing. If need be, we build a bridge of our own.

[``Canis culum in tuo naso'' is a Latin curse which first occurs in writing in the Old High German period (ca. 850-1050) in a phrase book for travelers which gives Latin phrases and their German equivalents. The Old High German equivalent is: ``hundes ars in dine nas''.]

Sancho: [to himself] Such nonsense! For windmills he sees giants. Trolls bigger than life. Oh, Lord, give me something small again, a pebble for my shoe!

Don Quixote: Sancho, forget your pebbles! Let us hie ourselves hence and find another crossing.

[Sancho and the Don turn about to find a crossing on another tributary of the great stream. Their thoughts return to the interface.]

Sancho: OK, you gave three examples. Tell me more about your universal gooey face.

Don Quixote: [grimaces at Sancho] Sancho, if I am no longer your master, how will you fill your belly? I said Universal GUI interface, not gooey face. Sometimes I don't think you take me seriously.

Sancho: Sorry, Master! Tell me more about your gooey inter...face.

Don Quixote: That's better. First, the universal GUI interface should be a standard that remains the same from platform to platform just like STL or ANSI C++. The details of the implementation should be hidden from the client because they're platform dependent. This interface means that ideally programs can run on multiple platforms without change.

Sancho: What is the gooey interface supposed to do?

Don Quixote: That's easy. The interface should provide a complete set of tools which perform routine window management tasks and offer all the functionality of the provincial GUI interfaces already in place. These tools should be general enough to be very flexible but powerful enough to compete head-on with the provincial GUI interfaces out there and provide programmers with a serious opportunity to write portable code.

Sancho: Great. But what language will you write this in? Spanish? Portuguese?

Don Quixote: C++ of course! It is object-oriented, supports inheritance, and the details of the implementation can easily be hidden from clients. It is also fast and allows access to the hardware.

Sancho: Can you be more specific? What procedures will your universal gooey interface include to manage a window?

Don Quixote: The details are best left to the Knights who convene to create the interface. All they need to do is decide what functionality the interface should include and then examine the provincial interfaces already in place to see if implementing that functionality is practical.

Sancho: Has anyone ever tried to write a universal gooey interface?

Don Quixote: Not that I know of. [Suddenly the Don is full of himself.] But there is rustling in the woods, voices from under the earth, whisperings in the breeze. A new age may be at hand. [The Don thumps his chest triumphantly as though the battle were already won.]

Sancho: [To himself] What nonsense! [To the Don] What do you mean? Your words are confused....uhhh...excuse, Sire, I mean confusing. Can you give an example?

Don Quixote: No one has tried to write what I speak of exactly but there are movements in that direction. The X Window System has been ported from Linux to OS/2 so that an OS/2 machine can be hooked to a Linux network and run its software. Also, a Windows emulator is being developed for Linux so that Windows applications will run inside Linux even though Linux is not a genuine Windows platform. Finally, programmers in Allemagne have created a conio.h and conio.c implementation that mimics the conio.h and conio.c files in Borland and Watcom C so that PC-DOS programs port more easily to Linux. And there is a PC-DOS emulator for Linux too. These achievements all attempt to allow someone to run a program on a platform it was not written for without changing code, and their common goal is portability.

Sancho: Do you think the knights will be able to do such a thing as the gooey face at all?

Don Quixote: I don't know, but I hope so.

Sancho: What stops them?

Don Quixote: Just a little cooperation.

Graydon Ekdahl is president of Econometrics, Inc. located in Chapel Hill, North Carolina. Graydon enjoys creating database applications and is interested in data structures, algorithms, C++ and Java. He can be reached at gekdahl@ibm.net.

  Previous    Next