Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

Windows Phone 7 Beta: Go Back…. No I mean the other Back

Having spent quite a bit of time working with Windows Phone 7 on both a real device and the emulator I’ve come to the conclusion that the Back button is awesome! Now when I pick up a lesser device, that for example only has a home key, I get frustrated that I can’t go back to the application I was just in, or cancel an action that I didn’t mean.

This said, there are some times when the behavior of the Back button gets in the way. The most frustrating of these is Internet Explorer. The Back button handles two different types of Back-stacks: Firstly there is the application back-stack. This is the stack of applications that have been opened. For example if you open App1, followed by App2, App3 and App4, you’ll have a back-stack that consists of Start | App1 | App2 | App3 | Start | App4 (note that the Start appears twice in the list, once immediately before the last application on the stack, and then again at the beginning of the stack). As you press the Back button you will navigate back through the stack, progressively closing the applications, so starting at App4 you would see the Start, App3, App2, App1 and then Start again.

The second type of Back-stack is within the individual applications, and by default is made up of the pages that have been navigated to in that instance of the application. I say by default because the Back button is the one hardware button that an application developer can intercept and handle within the application. This means that the application can maintain a completely custom Back-stack. For example, within Internet Explorer, rather than opening/closing pages, the Back-stack consists of the websites that have been navigated to. As you can guess, pressing the Back button within Internet Explorer is like pressing the Back button on any desktop browser, it takes you back through the browsing history.

Ok, so by now you might be able to see where my frustration lies…. Let’s combine these two Back-stacks and replace App3 with Internet Explorer, and let’s say that I was browsing for a couple of minutes and have visited three websites. The total Back-stack looks like this:

Start | App1 | App2 | IE (site1) | IE (site2) | IE (site3) | Start | App4

As you can see, the longer I spend browsing in IE, the larger the Back-stack is going to be, which is a royal pain if you want to empty the Back-stack, or you want to go back to App1 or App2.

So by now you might be thinking “quit your whinging, you can just press the Start button and then click on App1 or App2.” But here is the issue with that – because we have a “Consistent Start” experience, whenever we click on an application from the Start it will always relaunch the application as if it wasn’t already running. This means that if the application was previously in the background (or Tombstoned) it will be terminated and restarted. Alternatively, clicking Back to get back to a running application will return the application to the foreground in the state it was in (relaunching if Tombstoned but automatically navigating to the correct page etc).

Is there a work around for this? In Internet Explorer, there is – you can open a new tab, and then clicking the Back button will take you to the previous application. For other applications, there currently isn’t a general solution to get around this issue.

Could there be a work around in future versions? Well if you look at the iphone 4 model where you can double-tap the home key to bring up the list of running applications, this could easily be applied to Windows Phone 7. You could get a list of applications that are suspended/tombstoned and be able to select one to bring to the foreground. The interesting thing there is what this means for the Back-stack – does the selected application move to the front of the Back-stack (immediate thoughts would be yes, but what about if you open the CameraCaptureTask and then try to bring the calling application to the foreground?). I definitely think having the ability to swap between running applications is a must for v.next.

Comments (2) -

  • Sam Judson

    8/16/2010 3:15:12 AM | Reply

    This is a good point and something I had wondered about myself.

  • Bubba

    8/16/2010 1:13:07 PM | Reply

    Does this mean that you can use the back button in, let's say, a game to actually give you a physical button to utlize for on screen commands (i.e. 'fire' in a shooter)?

Pingbacks and trackbacks (5)+

Loading