Damn You, iTunes!
Today was a bad day for my iPhone 3GS running iOS 4.1. A new version of iTunes (10.0.1.22) seems to have caused sync to fail so much I had to restore from an old backup and sync my music library again from scratch. I don’t like losing data, especially when it’s the act of backing up that causes it to become so irretrievably lost.
Being Unfaithful with Windows Phone 7
With that in mind, I’m starting to eye-up the new Windows Phone 7 devices with increasing interest.
In this episode of the series of 7-minute short videos from Microsoft, Nancy Strickland shows us the user experience, design philosophy and application platform hardware and software of the Windows 7 platform.
I’m quite liking the Windows Phone 7 UI, named “Metro”. Apparently so-named because it was inspired by the clear “glanceable” signage you see in underground train stations. I’m guessing they’ve not travelled by tube in London, as I find the Windows Phone 7 UI to be a lot clearer than the Beck’s map.
![]() |
vs | ![]() |
New UI
In a similar vein to iOS and Android, Microsoft Windows Phone 7 as a simple yet powerful finger-driven UI. A friendly Start screen shows Tiles that depict different applications or “hubs”. As developers, we can add to these with our own applications. Out of the box there’s a People hub, a Media hub (which launches the Zune application) and many more.
The application layer is integrated with social networking platforms, and ready for new Web 2.0 services as they come along.
One feature I especially like the look of is the “Panoramic View”; regardless of ability or screen size of the hardware, you get a viewport that can easily be scrolled around the application page. The People hub (pictured above) shows an example of this.
Hardware Platform
Because the Windows Phone 7 OS is licensable software, unlike the closed-shop of iOS from Apple, you could be writing code for a variety of different physical hardware platforms. The Windows Phone 7 platform guarantees a minimum spec though:
- Video either WGA at 800×480 or HVGA 480×320
- Capacitive Screen
- Accelerometer
- GPS
- Camera with Shutter Button and Flash
- Codec Acceleration and DirectX 9 GPU
- Minimum 256MB RAM, 8MB Flash ROM
- ARM 7 Cortex/Scorpion CPU or better
- Start, Search and Back hardware buttons
Developer Platform
As developers we can write code for the Windows Phone 7 OS as Silverlight or XNA applications. These are both managed, .NET runtime environments, and XNA lends itself more readily to the games market.
The diagram to the left shows the logical layering inside Windows Phone 7. The top layer, the Application Runtime can be either Silverlight or XNA.
The Application Model handles management, licensing, isolation and software updates.
The UI Model deals with session management and the page-orientated navigation model. The Cloud Integration layer ties into XBox Live, Bing, LiveID integration, and includes location services and a push notification framework.
The Kernel layer comprises device drivers written mainly by Microsoft to ensure consistency across all vendors’ phones. Lastly we have the Hardware delivered by various vendors to the specifications above.
Windows Phone 7 and SharePoint 2010
But what gives? I’m usually all about SharePoint, and all this phone malarkey has got me posting massively off-topic. In an effort to claw-back some SharePoint-related dignity, let’s try and work through a Windows Phone 7 and SharePoint 2010 Highly Contrived™ example.
So, my Announcement list has the following contents:
Let’s say I wanted to read these from the Windows Phone 7 OS in a Silverlight application. With the current release of Silverlight on the platform, I’d have to allow Basic or Anonymous Authentication to the lists on my site. For my example, I’ve enabled Basic Authentication.
The code below could be used in the event handler for a button click event. It then goes and hits the SharePoint 2010 List Data ReST Service and brings back the ATOM feed of all the list items in the specified list.
- private void createButton_Click(object sender, RoutedEventArgs e)
- {
- string url = string.Format("{0}/{1}/_vti_bin/listdata.svc/{2}",
- sitecollectionName.Text, siteName.Text, listName.Text);
- HttpWebRequest webReq = (HttpWebRequest) HttpWebRequest.Create(url);
- webReq.Credentials = new NetworkCredential("USER", "PASSWORD", "DOMAIN");
- webReq.BeginGetResponse((result) =>
- {
- HttpWebRequest asyncReq = (HttpWebRequest) result.AsyncState;
- try
- {
- HttpWebResponse res = (HttpWebResponse) asyncReq.EndGetResponse(result);
- XDocument xml = XDocument.Load(res.GetResponseStream());
- XNamespace ns = "http://www.w3.org/2005/Atom";
- var items = from item in xml.Root.Elements(ns + "entry")
- select new { Title = item.Element(ns + "title").Value };
- this.Dispatcher.BeginInvoke(() =>
- {
- resultsTextBlock.Text = "";
- foreach (var item in items)
- resultsTextBlock.Text += item.Title + "\n";
- });
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }, webReq);
- }
Putting it All Together
OK, so it’s not the most refined UI in the world, but I knocked this up in only a few minutes using tips from Jan Tielens blog (thanks Jan!) and a little bit of Silverlight knowledge. The result is to the right, and I’m not at all disappointed with how easy this is. A nice-to-have would be if the SharePoint 2010 team could make a version of the SharePoint Silverlight Client Object Model available for Windows 7 Phone, then I wouldn’t need quite so much workaround-code above.
Ease of Use
The key for me was just how easy this whole process was. Once you’ve downloaded the Windows Phone 7 Developer Tools, it’s a simple matter of creating a new Windows Phone Application Silverlight project, dragging some widgets, writing some code and hitting F5 to debug and deploy to the built-in Windows Phone 7 Emulator. Also, C#, Microsoft .NET and Silverlight will be so familiar to a huge audience of would-be Windows Phone 7 developers.