Web Wars: Return of the Command line

Aza Raskin’s keynote “Don’t make me click” on day three of the ajax experience revealed an interesting pattern, without actually mentioning it – therefore I label it The Return of the Command line.

Web Wars: Return of the Command line

For a start, lets clarify what a command line is:

from wikipedia:
A command line interface or CLI is a method of interacting with an operating system or software using a command line interpreter. This command line interpreter may be a text terminal, terminal emulator, or remote shell client such as PuTTY.
The CLI continues to coevolve with graphical user interfaces (GUIs) like those provided by Microsoft Windows, Mac OS and the X Window System. In some applications, such as MATLAB, a CLI is integrated with the GUI, with the benefits of both.

In other words: A plain text input that accepts any text and tries to interpret it. Well known are those provided by your operating system: Some DOS descendant on Windows and various terminals on unix and its derivates. Most common are commands for working with the file system, like searching for files. Using “grep” with a regular expression to search for certain files based on some esoteric content can save you a lot of time.

While these may be well known, I think those most popular, in terms of people being able to work with them, are others.

If you are reading this directly in your browser (and not through some feed reader), you’ve came here in one of two ways: Entering the URL of this site in your browser’s address bar, or following a link from another site. In the latter case, its quite likely that the link was on a Google search result, where you’ve entered some term to search for.

Both the address bar and the Google search box are command line interfaces.

Lets look at a few examples for the address bar (all on Firefox 2):

  • If I enter “mail.google.com” in my address bar, my mailing application opens. I don’t even need to log in. Just like you’d expect from a desktop mail client.
  • If I enter “leo compulsive” I get english-german translations for the word “compulsive”. I’m not asked whether I’m looking for german or english translations. Instead, the application just looks for both and shows the result, allowing me to scan through it and find what I’m looking for quite fast.
  • If I enter “osi” I get search results from google.com. The browser can’t get resolve the term as a URL, so it just forwards to a search engine.

Greatly simplified, the browser does this: For a single term, ask the DNS for the IP address. If found, go there, otherwise fallback to search for it. For more then one term, try to use the first as a command name, eg. “leo”, and pass the rest as parameters.

That is still quite similar to classic command line anatomies:

[doSomething] [how] [toFiles]

doSomething is, in effect, a verb, how an adverb (for example, should the command be executed “verbosely” or “quietly”) and toFiles an object or objects (typically one or more files) on which the command should act.

Now, what about the Google search command line? Basically it provides full text search for websites – finding millions of results for almost everything (A friend once told me about a game he used to play with others at school: Try to find a term that produces the fewest results, but at least one).

A bit less well known, but nonetheless very useful, are options to improve the search, like grouping terms, excluding or promoting them, or doing special searches for books, music, movies. And even a calculator. And a currency converter. You don’t even have to know the currency short terms, just enter something like “379 dollar to euro” and you get the result.

I didn’t even know about the currency converter until now. I used to use Google to find one whenever needed, often landing on ugly pages stuffed to the top with ads. Or with UIs that featured one input field for the amount, and two select elements for the two currencies, like the one at xe.com/ucc, forcing me to push the mouse around a lot.

And that is just what Aza Raskin was telling: Don’t make me click. Command lines are pretty good at helping to achieve that.

Do you have other command line examples on the web worth noting? Have you implemented one recently?


No more comments.
  1. i can only second these thoughts. the browser address bar has become the new input prompt, and the URL scheme defines its syntax (and part of the basic semantics, such as the domain). the web application, then, is akin to the interactive prompt of an interpreted language, such as python.

    it is a good thing if you are able to steer the application by using the address bar and typing in URLs (even if that can become a tad tedious), and it is equally a good thing when you can use the browser history (that shows page titles, not URLs) as a meaningful log of events that occurred in the past.

    pagecalls then become the fundamental bookkeeping-units of application logging, which is neat. ajax calls should respect that where deemed favorable, i believe, and leave re-visitable traces with a `#` (hash) in the URL (and maybe the title, too); those are subunits in the process of the application.

    maybe application development can be improved if we make pagecalls and subunits more visible in the logs. that sure is harder in a multi-user environment, but when building and testing the app as a single user, it could still lead to improved visualizations of the temporal flow of actions.

    on a related note, web services already use the URL as their basic form for eliciting specific responses from remote machines, and i think it would be a tremendous advantage if we had a programming environment where URLs and expecially paths (locators) could be used within the application and when communicating with the outside; after all, what is so different between `gallery.getPicture(id=2)` and `/gallery/picture?id:2`? that’s why i am researching ways to unify those two concepts, the dotted object notation and the slashed path notation.

  2. after all, what is so different between `gallery.getPicture(id=2)` and `/gallery/picture?id:2`? that’s why i am researching ways to unify those two concepts, the dotted object notation and the slashed path notation.

    Now thats a very interesting thought.

    I wonder which scripting languages allow those characters as an identifier, so you could implement an API that uses URLs…

    Well, after a few quick experiments, though I’m still very unfamiliar with it, it looks like you build stuff like that with Scala, in a complete type-safe way.

  3. Will

    Great post.

    I sorta consider keyboard shortcuts to be ‘command line’ – in the very same sense as it’s a mouse free computer interaction. for instance, I always use ctrl+L and crtl+K to get to the URL bar and Search Bar in FF respectively.

    Web apps and keyboard shortcuts are a funny thing though seeing as they are apps within apps (browser) within apps (OS). Who wins the keyboard shortcut battle is interesting. For instance, if I’m writing something online (blog post, webmail…) and I hit ctrl+s, I really don’t want to save the web page via my browser, I want to save a draft of what I’m writing.

  4. Hey Will,

    I didn’t know about CTRL+L/K, I always use F6 for the url and another tab for the search.

    Keyboard shortcuts in webapps are mostly a pain. Most times when a site tries to provide shortcuts, it would help more if tabindex=0 would be used more wisely.