JoelBlogs - Joel Jeffery's Microsoft 365 Blog

Microsoft 365, SharePoint, Teams and Office 365 Architecture, Development, Administration and Training

  • Home
    • Sitemap
  • Articles
    • #SPThingADay
    • SharePoint Online
      • SharePoint Online – Drag and Drop and Large File Uploads
    • SharePoint 2016
    • SharePoint 2013
      • Content Database Changes to the AllUserData Table
    • SharePoint 2010
      • Administration
        • Disable CRL Checking
        • Excel 2010 & PowerPivot
        • Limits & Thresholds
        • PeoplePicker AD Errors
        • Recycle Bin Behaviour
        • Renaming a Server
        • Service Pack 1
        • Unattended Installs
        • Uninstall All SharePoint 2010 Solutions via PowerShell
        • User Alert Management
        • Virtualised SharePoint
        • Visio Stencils for Administrators
      • Development
        • Audience Membership Workflow Activity
        • Base Types, Lists & Content Types
        • BCS & Offline Sync
        • Debugger Skipping Lines
        • Development Laptop Spec
        • Enabling JavaScript IntelliSense
        • Event Receivers & Deployment Jobs
        • FavIcons & SPUrl
        • Google Maps Sandbox Web Part
        • Group By Content Type for List Views
        • Locale Stapler / Master or Default Locale
        • Removing Default Editor Parts
        • Sandbox Embedding Resources
        • Solution Sandbox Introduction
        • SPPersistedObject
        • Restoring Deleted SPSites in SP1
        • SPWebConfigModification 1
        • SPWebConfigModification 2
        • STSADM copyappbincontent vs. Install-SPApplicationContent
        • Workflows for Beginners
        • Workflow InitiationData Seralizer
    • SharePoint 2007
      • Alternate Access Mappings
      • Excel Services
      • Excel Services UDFs & Excel Client 2007
      • Experiences from the Field
      • InfoPath & Forms Server
      • Kerberos & SSRS
      • Records Management
      • Web Application Service
      • WSS vs MOSS
  • Training
    • SharePoint Admin Links
  • Downloads
    • Summary Slides for PowerPoint
    • CodePlex Projects
      • Audience Membership Workflow Activity
      • Google Maps Sandbox Web Part
      • Group By Content Type in List Views
      • Locale Stapler / Master or Default Locale
      • SharePoint Outlook Connector
  • Hire Me!
    • MCP Transcript
    • Résumé/CV

Windows 7 Phone, Silverlight and SharePoint 2010

October 4, 2010 by Joel Jeffery

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.

Windows Phone 7 People Hub vs London Underground Beck's Map

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.

Windows Phone 7 Application LayersThe 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:

Announcement List in SharePoint 2010

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.

Code Snippet
  1. private void createButton_Click(object sender, RoutedEventArgs e)
  2. {
  3.     string url = string.Format("{0}/{1}/_vti_bin/listdata.svc/{2}",
  4.         sitecollectionName.Text, siteName.Text, listName.Text);
  5.     HttpWebRequest webReq = (HttpWebRequest) HttpWebRequest.Create(url);
  6.     webReq.Credentials = new NetworkCredential("USER", "PASSWORD", "DOMAIN");
  7.  
  8.     webReq.BeginGetResponse((result) =>
  9.         {
  10.             HttpWebRequest asyncReq = (HttpWebRequest) result.AsyncState;
  11.  
  12.             try
  13.             {
  14.                 HttpWebResponse res = (HttpWebResponse) asyncReq.EndGetResponse(result);
  15.                 XDocument xml = XDocument.Load(res.GetResponseStream());
  16.  
  17.                 XNamespace ns = "http://www.w3.org/2005/Atom";
  18.                 var items = from item in xml.Root.Elements(ns + "entry")
  19.                             select new { Title = item.Element(ns + "title").Value };
  20.  
  21.                 this.Dispatcher.BeginInvoke(() =>
  22.                 {
  23.                     resultsTextBlock.Text = "";
  24.                     foreach (var item in items)
  25.                         resultsTextBlock.Text += item.Title + "\n";
  26.                 });
  27.             }
  28.             catch (Exception ex)
  29.             {
  30.                 MessageBox.Show(ex.Message);
  31.             }
  32.         }, webReq);
  33. }

 

Joel's SharePoint 2010 List Lister for Windows Phone 7 and SilverlightPutting 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.

Windows Phone 7 and Visual Studio Debugger

Filed Under: Computers and Internet, SharePoint Tagged With: Mobile Development, SharePoint, Silverlight, Windows Phone 7

Getting Started with Windows Phone 7 and Silverlight Development

September 29, 2010 by Joel Jeffery

In this video, Nancy Strickland from Microsoft shows us how simple it is to create a functional Windows Phone application using Visual Studio 2010, and even the free Express edition tools at the Windows Phone Developer site

I’ve been a Windows Mobile user since the first SmartPhones came out back in 2001. I upgraded almost yearly, putting up with glitches and slowness, as despite being glitchy and slow, it was consistently the best phone platform for a geek like me.

This all changed in 2008 with the advent of the iPhone 3GS. Suddenly the Jesus Phone seemed to have come of age. All the applications I felt I needed from the SmartPhone and Windows Mobile platform were available (or close approximations) on the iPhone.

Although I seldom wrote code for the Windows Mobile platform, it was always nice to know that I could have if I’d needed to. Maybe using the compact .NET framework.

And this is probably my biggest problem with the Steve Jobs mobile platform: it’s a closed shop. I’ve got to use ObjectiveC or nothing. No support for Flash or Silverlight or the .NET Framework. Or any framework as far as I can make out from the outside, until very very recently. Even the Appple Developer Terms seem to conspire against techies who haven’t yet drunk all the iPhone Kool Aid.

So, as much as I love my iPhone 3GS with iOS 4.x, my next phone will be a Windows 7 Mobile phone.

Free developer tools, and I don’t need a Mac.

Filed Under: Computers and Internet Tagged With: Mobile Development, Silverlight, Windows Phone 7

« Previous Page

Joel is a full-stack cloud architect who codes. He is a Microsoft Certified SharePoint Online, SharePoint Server and Azure specialist and Microsoft Certified Trainer.
He has over 20 years' experience with SharePoint and the Microsoft .NET Framework.
He's also co-founder of Microsoft Gold Partner JFDI Consulting Ltd. Read More…

Recent Posts

  • Microsoft Flow Tip #1 – Word Templates and Hiding Empty Repeating Sections
  • SharePoint PowerShell Tip #1 – Select-Object and FieldValues
  • Popular Misconceptions – Microsoft Teams relationship with SharePoint
  • Course: Microsoft 365 Certified Teamwork Administrator
  • Audience Targeted Searches in Modern SharePoint Online
MCT 2020-2021
Microsoft Teamwork Administrator Associate
Joel's Acclaim Profile
Joel's Microsoft Profile

Tags

Administration Architecture Certification Cloud Development freetraining Information Architecture intranets MCP Microsoft Microsoft Architecture Microsoft Azure microsoftsharepoint migration Mobile Development MOSS Office 365 office365 Office 365 Permissions PowerShell SaaS SharePoint SharePoint 2010 SharePoint 2010 Training SharePoint 2013 SharePoint Administration SharePoint Administrator SharePoint Architecture SharePoint Developer SharePoint Development sharepointia SharePoint Online sharepointonline SharePoint Search SharePoint Training SharePoint Videos Silverlight SOA SPThingADay TechEd 2007 Training Videos Windows Phone 7 WSS

Copyright © 2022 Joel Jeffery, SharePoint Architect