iTouch/iPhone UI: Appointment Date/Time

iTouch/iPhone UI: Appointment Date/Time

When the iPhone first came out and everyone was raving about its user interface I had to agree with them, despite being a long-term Windows Mobile user.  Of course, like all new user interfaces there are always going to be some learning points but on the whole there is a lot to be said for an interface that was solely developed for the use with a finger.

Take the following screenshot, which is actually of an iTouch but could easily be an iPhone, you can see that at the bottom of the screen shot is a set of rollers.  These are used to set the date and time that an appointment is to start.  By flicking your finger across the rollers you can wind the date/time forward/backward at different speeds depending on how quickly you move your finger.

IMAG0087

The clear advantage of this interface over the traditional date/time pickers used by the new appointment dialog on Windows Mobile (see below).  In fact the Windows Mobile interface is so bad (actually perhaps old is a better term of it) that you can’t reasonably use it with a finger, you really do need to either use a stylus or if you’ve worked out how, the d-pad.

image image

The current guidance from Microsoft for new Windows Mobile applications is to build for the smartphone (ie no-touch) with the assumption that this is the canonical set of the controls available for both platforms.  Unfortunately this is probably the worst thing you can do for a usable touch interface.  In my opinion if you want to build an awesome application for the Pocket PC (ie Windows Mobile 6 Classic or Professional – urge why do we still have such silly sku names!) you should be focused on a “touch first design”.

Side note: My apologies for the rather poor photo of the iTouch. Of course Pocket PC Controller (used for the Windows Mobile screenshots) doesn’t work with the iTouch and my HTC Touch Dual has a barely competent camera under low light conditions 😉

MVP Global Summit Days 0 and 1

MVP Global Summit Days 0 and 1

Just a couple of images captured from Monday and Tuesday here in Seattle:

IMAG0066

Surface Computing: Just One Big Expensive Toy 😉

 IMAG0067

Taking a break after talking Sync Services and SQL Server Compact Edition 

 IMAG0070

Dave’s leading the charge (hey, he’s not an MVP….)

 IMAG0068

Pick your weapon – personally I think the i-mate keyboard is too small and hard to use

 IMAG0069

Am I in the right area?

IMAG0071

Everyone’s pretty drained after today’s discussions with the product teams (spot the person who is asleep)

Weather interruption = Half a day in San Francisco

Weather interruption = Half a day in San Francisco

Sunday afternoon saw some dodgy weather hitting the airport that resulted in my Qantas flight from Sydney to San Francisco being delayed by about an hour and a half.  Whilst we were hopeful that they would be able to make this time up in the flight, these hopes we soon to be dashed as we hit some nasty turbulence through the night.  End result, a few of us missed our connecting flight through to Seattle.  The situation got worse as they could rebook us on other flights today.  This either meant getting an early morning flight or going across the hall and buying a cheap Virgin America flight.  Both Grant Holliday and I decided to go with the Virgin flight which meant had some time until the 8pm flight. So, we thought we’d step outside the airport for a bit of fresh air.

IMAG0042IMAG0041IMAG0043

Given we had over 5 hours to kill we decided that we should head downtown to try to take in some of the tourist sites.  After jumping on the main train system “BART” we ended up downtown a couple of blocks from Union Square.  As we emerged from the underground station we were greeted by a jazz band knocking out a number or two on the pavement.

 IMAG0044

We got our bearings and made our way across to Union Square where there was an open-air art display.  Nothing particularly catching although all fairly modern pieces.

IMAG0049 IMAG0048

From Union Square we too the cable car down to Fisherman’s Wharf. Apparently all the cars run on 4 cables that are driven from a single engine room.

IMAG0047 IMAG0046     

From the end of the cable car there was a short walk down to the piers.  On the way we saw some magnificent cars….

IMAG0053IMAG0052IMAG0054
From the Wharf you can see what feels like the entire bay.  Right in the middle of the view is of course the infamous Alcatraz prison.

IMAG0056IMAG0055IMAG0059

But you can also look back towards the city, taking in the vibrant pier area and at least a portion of the somewhat hilly city.

IMAG0063 IMAG0062 IMAG0061

The other attraction we poked our heads in on was the seal colony just off Pier 19.     

IMAG0057

Then it was back on the Cable car, then the BART and back to the airport.  The Virgin America flight was actually a great experience.  Despite being a discount carrier they still serve you a drink after the flight has taken off, the decor is all brand new, which includes the in-flight entertainment system.  You have to pay $7 for the movies (similar range to the earlier Qantas flight) but nearly everything else is free, including live satellite TV, games (Doom was an immediate hit!), music and radio.  I have to commend them on putting together a flight service I would definitely recommend, unlike the rubbishy Australian counterpart, Virgin Blue.

I’m currently writing this post from the scheduled charter bus service that runs from the airport to the downtown hotels.  For $11 per person, per direction, you can’t really go wrong. After a busy day I’m looking forward to getting a good night’s sleep and then catching up with fellow MVPs as the MVP summit begins (a week of Geeky Fun-ness).

Silverlight: When an Async request isn’t Asynchronous

Silverlight: When an Async request isn’t Asynchronous

Having not done much with Silverlight I thought I’d give it a go today building a very simple application that would periodically go off to a webservice, retrieve a new item and insert it into a list.  The UI which you can see below is very basic – it has a Start and Stop button and a list which is gradually populated with items. Clicking the start button initiates the request process which periodically (approx every 2 secs) makes the web service request.

image

This all seems simple enough and you would have throught the following would work:

    Private service As SimpleServices2.SimpleService2SoapClient

    Private Sub Start_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs)
        If service Is Nothing Then
            Dim temp = New SimpleServices2.SimpleService2SoapClient
            service = temp

            AddHandler temp.HelloWorldCompleted, AddressOf SimpleCallBack
            temp.HelloWorldAsync()
        End If
    End Sub

    Private Sub SimpleCallBack(ByVal sender As Object, ByVal e As SimpleServices2.HelloWorldCompletedEventArgs)
        Static count As Integer
        count += 1
        Me.mItemList.Items.Insert(0, e.Result & " " & count.ToString)

System.Threading.Thread.Sleep(2000)
Dim temp = service If temp Is Nothing Then Return temp.HelloWorldAsync() End Sub Private Sub Stop_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) If service IsNot Nothing Then Dim temp = service service = Nothing RemoveHandler temp.HelloWorldCompleted, AddressOf SimpleCallBack End If End Sub

Whilst this would appear to work the UI appears to be very unresponsive.  Sure enough if you put a breakpoint in you will see that SimpleCallBack gets executed on the UI thread – most unusual if you are used to WinForms programming where the call back would generally not be on the UI thread.  Ok, so the thing to do here would be to create a background thread to do the periodic web service call. 

Wrong again! Unfortunately as Simon points out there is a dependency that requires service calls to be made on the UI thread (urgh you say). So, now we have to code around this in order to jump to a background thread to sleep (so as not to block the UI thread), then jump back again to the UI thread to execute the web service request.  Of course ideally a bit of refactoring would result in us initiating a background thread that simply makes a synchronous call but unfortunately there is no synchronous method on the service proxy.

What we end up with is the following:

  Private Sub SimpleCallBack(ByVal sender As Object, ByVal e As SimpleServices2.HelloWorldCompletedEventArgs)
        Static count As Integer
        count += 1

        Me.mItemList.Items.Insert(0, e.Result & " " & count.ToString)

        Dim t As New System.Threading.Thread(AddressOf WaitThenRetrieve)
        t.Start()
    End Sub

    Private Sub WaitThenRetrieve()
        System.Threading.Thread.Sleep(2000)
        Me.mItemList.Dispatcher.BeginInvoke(New System.Threading.ThreadStart(AddressOf RetrieveNewItem))
    End Sub

    Private Sub RetrieveNewItem()
        Dim temp = service
        If temp Is Nothing Then Return
        temp.HelloWorldAsync()
    End Sub

This ain’t a great looking solution but I’ll leave it to you to work out how you can abstract this into a background thread, or better still into a wrapper class that handles the rubbish stuff for you…..Perhaps the Silverlight team might want to FIX this as it’s a royal pain at the moment.

Ecma Office Open XML as an ISO Standard, No April Fools

Ecma Office Open XML as an ISO Standard, No April Fools

Over the last couple of days I’ve been digging through some of the developer resources for working with the Office 2007 file formats and came across the announcement that the Open XML file formats have won approval as ISO/IEC standards.


Although I doubt that this will result in the end of the file format wars I think it will cause an explosion of developers working with these formats for automatically generated documents, spreadsheets etc.  Microsoft is supporting this effort with an Open XML SDK Roadmap looking something like this:


Open XML SDK roadmap: timeline


The June 2007 CTP of the SDK is currently available for download. Although, given the proposed timeline we should see a second CTP sometime in the next month or so.  Version 1 of the SDK only really provides a wrapper around the packaging format.  Where the SDK becomes really exciting is when it provides access to the document information itself (ie a rich API for creating documents).  Hopefully we will see that in version 2 later this year – I’m guessing that the release will be scheduled inline with the next release of Office.


While I remember, here are a couple of interesting resources to get started with too: