Sep 15 2009

Replacing menus with dashboards

Category: Android, Ideas, MobileAleksander Kmetec @ 10:00 am

Is it just me, or do most dialogs on Android seem to be removed really, really far away from the main parts of applications?

Not sure what I’m talking about?

Let’s take a look at the browser, for example. Just entering a new URL requires you to go through 3 different screens:

By the time you can start typing it feels like you’re already in a different application1. Switching to a different window also involves going to a special part of the application designed to handle this single task.

This pattern is not limited just to the browser. Entering an address in the maps application or searching the list of your contacts also involves going through several steps.

Back to the browser…

If you take a look the UI of a regular browser you can immediately see a number of frequently used elements such as the location bar, the back button and tabs for switching between windows. Those UI elements are always visible and usable with a single click. On mobile devices things are a bit different. Because of limited screen sizes most of browser’s UI is either eating away precious screen real estate (like on the iPhone) or is hidden behind a menu button (like on Android).

Except that because of the nature of menus, many of those features are not hidden just behind the menu button, but also behind an item on that menu.

Now, just as I’m typing this, Marissa Mayer is on the stage at TechCrunch50 introducing Google fast flip and talking about how Google is obsessed with speed and shaving milliseconds off of repetitive interactions. So what can can we do to speed up interaction with Google’s mobile browser?

First, we need to understand what’s wrong with menus.

A typical menu is a list of actions available for that application, but most of those actions can’t be performed from the menu itself. Instead, selecting an item takes you somewhere else where that action can finally be performed. In essence, a menu keeps asking the question “What do you want to do?” over and over again and the user then needs to explicitly say that he wants to go to to the place where he can type in an URL or go to the place where he can switch to a different window, etc.

How do we handle this situation where we know that in many applications the user’s answer to the menu’s question is going to be the same most of the time?

Like it is the case usually these days, the solution can already be found on the iPhone. No real surprise there. The iPhone doesn’t have built-in support for application menus which could be copied, but it does have this:

What you’re looking at is a special dashboard for controlling music playback, which can be brought up by pressing the home button twice.

With a bit of bad luck – or bad judgment – this could have easily been implemented as a list of items such as “adjust volume” and “control playback”, with each of them leading to a new screen where that action could be performed. But instead its designers made it possible to perform common actions directly from the pop-up and added a “Music” button that takes you to that other app where the rest of the playback controls are.

So let’s take this dashboard pattern and apply it to Android’s browser menu:

2_alt1_small

While some features (like bookmarks) still remain hidden behind a menu button, the two most commonly used ones are immediately presented in usable form. The “go” button is replaced by an actual location bar and the “Windows” button is replaced by thumbnails of windows. You now no longer need to announce first that you want to go to a different page or switch to a different tab; you can perform that action directly instead.

A quick before/after comparison:

Action Before After
Loading a web page press “menu” → press “go” → focus URL field (3 steps) press “menu” → focus URL field (2 steps)
Switching to a different window press “menu” → press “tabs” → select tab (3 steps) press “menu” → select tab (2 steps)

Removing a single step here and there may not seem like much, but it adds up. Making a typo in the URL or working with several windows suddenly becomes just a little bit less frustrating. A simple improvement that can be achieved simply by ignoring the established meaning of the word “menu”.

  1. Sure, if you have a phone with a physical keyboard you can just start typing and invoke the default action without going through menus, but what if your phone uses an onscreen keyboard or if you want to use some other action?

Tags: , , , , , ,


May 04 2009

On named parameters

Category: IdeasAleksander Kmetec @ 5:07 am

Here’s a proof that quitting your job and not working on anything for two months is not good for you: I just spent two days pondering why named function parameters are loved by coders and considered an important part of many programming languages while named parameters in URLs are considered to be ugly, harmful and one of the leading causes of scurvy. Developers will even find a way to emulate named function parameters in languages which don’t support them by default while at the same time they will try their best to make all the parameters in URLs of their websites strictly positional. It makes everyone look a bit confused and bipolar, if you ask me.

Here’s a quick overview of the situation.

Named parameters in URLs: BAD
http://domain.com/list?type=fruit&page=1&items=20

Positional parameters in URLs: GOOD
http://domain.com/list/fruit/1/20

Named parameters in function calls: GOOD
foo.list(:type => “fruit”, :page => 1, :items => 20)

Why is this so? It might have more than just a little bit to do with the fact that coders spend a lot of their time reading, writing and modifying function calls, while URLs are only rarely modified by anyone (or even read, for that matter). The need to modify URLs is so rare in fact that many security holes exist only because developers never even remotely considered that someone might insert an unfriendly value into one of the parameters. It makes sense then that if URLs are only meant to be looked at, to make them short and pretty and clean of any characters which make them appear as if they’ve been involved in an explosion at the ASCII factory.

Why then is the URL, this unfriendly sequence of characters, still presented as a fully editable value? Is it really not possible to turn it into anything more than a barely readable “you are here” sign?

Microsoft managed to do something interesting with the way directory paths (URL’s distant relatives) are displayed in Vista and Windows 7: each directory is a separate button and clicking any one of them takes you directly to that directory.

Windows explorer in Vista

Two different ways of displaying the same directory path

Couldn’t something similar be done for URLs? Here’s my suggestion: make it easy to experiment with different parameter values. Hide all the “noise” characters. Turn each key/value pair into a button and offer alternative values when somebody clicks them.

Location bar

Now, this might not catch on with your average Joe Streetperson, but it does look like it could be useful to developers when they are testing a website or a web service which returns different XML/JSON based on parameter values.

Think of it as Intellisense for the location bar.

Tags: , , ,


Jan 20 2009

Android WebChromeClient

Category: Android, WebView examplesAleksander Kmetec @ 4:30 am

My blog stats are telling me that many visitors are arriving here looking for examples on how to implement WebChromeClient on Android. I don’t (yet) have a nice article about how to do it, but you can have a look at how I implemented WebChromeClient in Mosembro, if you came here for that reason. Just use your browser’s search functionality and look for “new WebChromeClient”.

Reblog this post [with Zemanta]

Tags: , , , ,