Interoperability Between the GUI and the CLI?
shylock0 asks: "I use AutoCAD pretty extensively, and one of the things I've always loved about it is the fact that, in addition to having a GUI, it has a really great command line -- which you access simply by starting to type, and which will actually work alongside your mouse. CAD lends itself to this duality, mainly because its nice to be able to deal with the overall work visually, but be able to specify dimensions exactly. Having to use the mouse to click on a separate dimensioning tool-box for every element you create wastes a substantial amount of time. You can even use mouse and keyboard side-by-side, without clicking yourself into a different environment -- for instance, if you have selected an element, and are using the mouse to rotate it, starting to type commands to resize the object doesn't stop the mouse from being in rotation mode. Such functionality would allow complex tasks -- beyond just opening, saving, and so forth -- using direct keyboard input, but would work in the context of the GUI. For instance, it would be great if I could copy files from an open window just by starting to type 'copy'. What other apps, both commercial and free, still have an easy-to-enter command-line style element?"
"This seems to me to be a feature that would be great to have, particularly in operating systems and productivity apps. Once you get the hang of the commands, and assuming you can type quickly, keyboard input is actually faster than using the mouse. In AutoCAD, I can design an entire house using just the keyboard. How much productivity has been lost by the decline of keyboard use beyond simple shortcuts?"
KDE has some sort of high-level messaging protocol so that one can send events, making it appear as if menu items were chosen and whatnot.
Not sure how concise the syntax is, but this allows command-line control of the app.
I can't wait until someone *finally* has a GUI, drag and point interface to setting up interapp messag sending. I mean a rapid development environment where I can choose a menu item, drag a little line to a button in another window, and have that button trigger said menu item.
Cocoa is fairly similar, but there's no free equivalent, and Cocoa, AFAIK, does not have a lot of work put into making it interact with the command line well, which would also be important.
May we never see th
and its clones, for many many years already
"It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
Microstation has it too. It has a lot of features that AutoCAD has (apparently, they're bumping heads in a few market niches). It's very easy to get to the command line, just like AutoCAD.
- Bill
The symbolics Lisp Machine user interface was based around this. For an impression of it looked like and worked, look at this movie. CLIM is available for the two major commercial Lisp implementations from Franz, Inc. and Xanalys; there is also a free implementation in the works. Here are some relevant links.
Programming can be fun again. Film at 11.
Are all gay. You can tell by the lisp!
(it's a joke. if you've never used AutoCAD, you don't get it, so don't mod me down)
Debase III had a "gui" that generated the commands at the bottom of the screen as you picked from the menus. You could also type into the command line. I learned a lot by watching the commands being formed as I made selections from the menu. As I learned I started typing more and more of the commands myself.
This might be a good way to introduce the GUI users to CLI by letting them see the relationship between the commands and the actions. Once they have seen how simple the command line is they may not feel as intimidated.
Charles Puffer
I've always loved the fact that hitting the tilde (~) key would bring a semi-transparent console down over the top half of the screen when playing Quake engine games. I think this is one of the smartest features of the product.
It has made me wonder why nobody has implemented this on an OS level. Mac OS X would be perfect for it for example. To just hit a key and have a console drop down from the top menu bar would rock. Frankly, if I had the programming skill, this would be the first thing I'd want to write.
I totally agree that CLI and GUI should be designed to work together. It really shouldn't be an 'either/or' consideration.
In a lot of cases, I'll use smit to do something, then repeat from the command line to run over multiple instances (e.g. to mirror multiple logical volumes).
Also, somewhat more directly in response to the question posed by the article, Konqueror can embed Konsole (the KDE terminal emulator) in a frame. When you switch directories in KDE's file browser, the terminal automatically does a "cd" to the new location. I've found this useful from time to time, although generally dragging and dropping directories or files from Konqueror to a separate Konsole instance has worked well for me.
And the syntax for command-line control of KDE apps looks roughly like this (shooting from the hip, since I'm not near a KDE-running system at the moment):
dcop KScreensaverIface lock
(This would lock your screen, probably one of the more useful actions to be able to script.)
I metamoderate all Redundant and Offtopic moderations as Unfair.
DDD (a gui front for gdb) has this. I haven't used any other gui debuggers for a long time but I seem to remember M$ had something like this in theirs as well. You can use all the gdb commands in the command window, plus when you execute a gui action it will show you the command in the command window. Very helpful for weaning windows folks from the gui only mindset.
There was a small app for MacOS 7.1 back in the day that would allow you to submit DOS style commands: mkdir, rename, copy, move. Basically an experiment in API calls. I haven't owned a mac since '94, so I don't really know if this little app still exists.
I have always liked the AutoCad environment...infact when working in other CAD or simlar environments that don't have it I am lost...
I also wish such a thing existed under the various Windoe managers, Explorer, KDE, Gnome, etc where you could use the keyboard and the mouse inconjunction...what a great thing that would be...
I can think of all sorts of inovative ways to to use this sort of functionality....
Imagine in the command window...
Rename (click a bunch of files in the dir listing) *.old
Power Corrupts,Absolute Power Corrupts Absolutely, leaving one person(group)in charge is absolutely corrupt.
In Macintosh Programmers Workshop. It's not quite the same thing, though. It's a dialog box that presents you with a preferences page containing all the command line switches of a particular MPW tool.
You can interact with the command line after selecting which packages you want to install/update. The reason for this is that the GUI is a wrapper for comand line functionality. Instead of obscuring the command line it allows you to interact with it. It will even launch the terminal app and type commands in it if you prefer that.
I have done a lot of graphics work and I must say that if photoshop and illustrator coudl do this I would be rather pleased. You get to the point where you know exactly what needs to be done, but is a PITA to go to Edit>Image>Curves and drag around a picture of a curve rather than feed it exact values in a console. I think any application where you perform consise operations on visual data would benefit from this approach.
We should make up a buzzword for it. What about "Active GUI" or "Dynamic GUI"? Once it is established as a marketing word it may achieve popularity.
"The plural of anecdote is not data." -- Roger Brinner
"In AutoCAD, I can design an entire house using just the keyboard."
/-----\
Who needs AutoCAD? I did this in a Slashdot comment box. And best of all, it meets the Slashdot seal of approval, since it has no Windows!
| _ |
| | | |
| | | |
When I was a kid in the early 80s and I read about "object orientation" and especially in reference to graphic user interfaces I really expected much more from them -- I remember my first encounters with Macintosh, Windows, Presentation Manager, etc. I was very disappointed. I was similarily disappointed years later when I finally got to play with the Smalltalk GUI that I had read about.
:-(
The only UI that impressed me was the Hypercard UI in combination with Hypertalk.
It has always seemed to me that there is such an incredible disjunction between the object-oriented infrastructure of some applications and the presentation they choose.
If things are truly object oriented, in the sense that objects are responding to messages and inheriting behaviours from each other, as a user of an application I ought to be able to send those messages. I also ought to be able to swap components out and visually replace them with other objects matching the same interface. I ought to be able to bring up a window and use a Smalltalk-style Inspector or Browser and visually see the relationship of objects in the application.
In an ideal world I ought also to be able to mouse over something, and bring up a _real_ "dialog box" and actually enter in messages for that object to invoke and see their responses. This seems similar to what the author of this slashdot submission was describing. (But to me it's less about "command line vs non-command line" as its about authors opening up the infrastructure of their apps for extension, scripting and inspection in general.)
But instead, GUI applications are really quite static, made out of prefab generic components. As an application author using an OO language I can't even use genuinely OO techniques with the GUI components: their implementation is frozen, you typically can't even really inherit from them (or if you can, you can't really change the visual implementation very much).
The only system that I've seen that defies this general trend is the Morphic graphics system in Squeak Smalltalk (but developed on Sun's Self project.) It's the only system I've seen that seems to focus on GUIs as environments (focused around objects) for exploration and customization rather than set, static applications where the focus is on "running the program" instead of on "using the objects."
Sometimes I feel we've made very little progress in the last 25 years
...but the program has a reason for allowing you to do that. Quake, Autocad, etc. are examples of programs that are primarily visual and need a command line for finer grain tasks.
This requires the program in question to have an object model that the console can address. Otherwise, what will your command line do? It's currently possible to make a hotkey to bring up a command window anywhere in your current session, even in Windows. What's not commonly available though, is the ability for the command line to affect the currently running program meaningfully (like Quake does). What's even further away is the ability to control all applications from the command line consistently from anywhere in the OS. One application might only speak LISP, and the next will speak Lua, and the next might only "speak" ActiveX (where any ActiveX capable language can access it), etc.
So, the bottom line here is that it's virtually impossible to put this sort of thing together on an OS level, given today's technology. You could put together an "OS-wide" command line using today's technolgy, but you will not be able to leverage every program you use in that way.
I do agreee that CLI and GUI should go hand in hand, but the fact that they don't is mostly related to the corresponding cultures assuming that they can't work together. Note that I don't think the marriage of CLI and GUI are a technical problem; it's (once again) a cultural problem.
Please mod this post only if you think others should/n't read this. I have enough ego^H^H^Hkarma. Thanks!
If anyone use Perforce (source code control) on Windows - the P4Win GUI client doesn't give you a command line, but it will show in a seperate pane all the "raw" commands it uses to drive the GUI, so if you want to know how to do something on the command line you simply do it in the GUI and then look at the log of how the program did it - very useful.
Similarly "Record a macro" in programs like Excel and Word will generate a (VBA) script of the function calls required to generate an action - again very useful for when you want to see how to do something programatically.
Finally, I always like the way that Emacs will intelligently use the status bar to report items like "you've been typing a long command but you've paused at this point", or some commands will display extra info (like - you could have done that with a keyboard shortcut), but these messages don't get in the way of what you're doing (like a modal message-box does). Oh, and recording actions to Lisp macros (cf Excel and VBA) is very useful too.
--
T
I spent a lot of money on booze, birds and fast cars. The rest I just squandered. - George Best
Of course, with everything from pixels (X), window managers, Object layers (GNOME) to Apps in
a single lisp address space, you can avoid or work around more than one layer binding the same key.
Have there been any developemts in seperate address space systems (X level?) to coordinate?
Pop-up? Was this shortcut destined for the App, GNOME, wm, or X ?
XMLTerm mixes the command line and XML hypertext. I find it an instersting concept.
__
Men with no respect for life must never be allowed to control the ultimate instruments of death.
GW Bu
Funny how the less productive AutoCAD drafters/designers would pick at the dozens of icons on their digitizing tablet overlay...and when not doing that at the menu sidebars. The fast ones would mostly pound the crap out of the keyboard with an occasional mouse movement. The slow ones loved their Compaq 386's, and the fast ones were on a waiting list for a Unix box (first Sparc 2's, then SGI Indy's)
Autocad is a quirky program built on 20 years of upgrades without abolishing the original format which was exclusively command line. They stopped versions at 14 and started going by date in 1999, just like Windows 2000. Our office kept release 14 around for 2 years because of printing glitches that stymied drawign production. It is basically the Microsoft of the CAD world, and just as incompatible. For 'production' it works great, where you have a trained monkey sit at a desk and click until his fingers seize from repetive stress injury. It is not very creative however, and takes intensive training and an intimate knowledge of the program to get things done. And don't try to make nice drawings with it, you might as well use a crayon. If you ever see an indecipherable engineering drawing, or flat listless house plan where you can't tell a wall from an electrical line, it was probably drawn with Autocad. Any office that is successful with Autocad needs an office high priest of Cad, who knows the idiosynchratic quirks of the program, and can pass them down to neophytes. Imagine a prgram half DOS and half windows, with all the baggage of DOS. It is bizarre. Unless you work on massive projects, Autocad can be a real pain in the patootie. The setup time of a decent sized project can be a day or two. Ugh! And then wait until you have to print, inevitably there are errors which can take a day or longer to figure out. It has an incredibly sucky and counterintuitive printing interface. Autocad is one of those prgrams that can give you an ulcer, male pattern baldness and a low sperm count from stress alone! I recommend it if want to be a miserable computer production chimp.