Command Line Interfaces & Progressive Enhancement

by Luke Wroblewski May 18, 2011

A command line interface (CLI) is the baseline for a progressive enhancement approach to software development. But what does that mean and why is Bagcheck built this way?If you’re curious about such nerdy things then you should keep reading...

Defining Things

For those of you still here, let’s take a moment to define a few things so we are on the same page. A command line interface or (CLI) is a software interface that relies on text prompts to run operations and display their results. CLIs are the follow-on to punched card interfaces and the pre-cursor to the graphical user interfaces (GUIs) millions of people use on their Macs and PCs. To use a CLI, you simply write out what you want it to do. For example typing “print address 55” could retrieve the address stored with an ID of 55 and display it as “100 View St. Mountain View CA 94041”.

Progressive enhancement is a philosophy and technique for creating software that focuses on an essential set of functions which are gradually enhanced when the computers running the software can do more. So if a computer can display a button with smooth gradients and text shadows, it will. If it can’t, it will display the same text to the best of its abilities, which could be nothing more than a color fill. In both cases the text displays, and people can read it. But how “enhanced” the features are depends on what the device running the software can do.

CLI and Up

The Bagcheck Web site began its life as an application programming interface (API) with a command-line interface. We view each subsequent rendering of the site (desktop Web experience, mobile Web experience, RSS feeds, native mobile applications, and more) as progressive enhancements of this baseline experience.

The Bagcheck CLI allows you to do all the things you can do on the Bagcheck Web site: view bags, follow people, create bags, leave comments, and much more. The biggest difference is everything happens as text. Here, for example, is how you can follow a person using the CLI.

LukeW:~ lukew$ bagcheck follow followprofile 14

Really not much to look at is there? Here’s the same experience enhanced to the capabilities of Apple’s Safari Web browser and Microsoft’s Internet Explorer 7 Web browser. Notice a difference? We’re now in the realm of images, buttons, and styles. But the way things appear is different between the two browsers because they have different capabilities.

bagcheck progressive enhancement

One can display rounded corners, text shadows, and gradients (Safari), the other one cannot (Internet Explorer). In both browsers, however, you can still follow someone you are interested in on Bagcheck. The baseline functionality works.

Why CLI?



We’re always putting new ideas into the CLI and then figuring out how they can graduate to Web browsers and mobile devices. Because we don’t need a graphical user interface to start using features, we can try new things out very quickly and decide if they are worth “enhancing”. Even complex features like search started getting used in the CLI first.

Further Enhancements

In these early days of Bagcheck, we’ve really focused on speed of iteration and performance over completely polished solutions. As a result, we have nothing but opportunities for progressive enhancement moving forward. From Javascript fallbacks to responsive web design, as we keep making Bagcheck, we’ll look for new ways to enhance the site and make it work well in more and more places.