Quick-Start Primer Video to Windows Phone 7 Tools, Data Access and Notification Services

I recently did a 1-hour screencast interview with Carl Franklin for Dot Net Rocks TV.

It’s a good primer for a few areas of Windows Phone 7 developer.

20100720 video

If you are looking for in-depth rapid training on developing for Windows Phone 7 then you should consider registering for this first major boot camp running across Canada.

Windows Phone 7 Boot Camp

The recording was done using the April refresh of the tools.  I’ll be following up with another one soon using the Beta tools to explain things like themes and application life cycle in more detail.

We covered the tools…

20100720 tools

The emulator…

20100720 emulator

Project types…

20100720 project types


Visual Studio Tools…

20100720 vstools

Mapping Applications…

20100720 mapapp

Data Binding/Access… to a service exposed through Windows Azure AppFabric Service Bus

20100720 dataaccess

Notification Services which is essential to building applications that receive information from the cloud.


20100720 notification

Hopefully the video gives you a good sense of what is possible, and if you want this speed of knowledge transfer or faster… go for the bootcamp.

Windows Phone 7 Boot Camp


Silverlight from the Client to the Cloud: Part 1

This post is part 1 in one of several series.  The series gives you a glimpse into some of the experiences and capabilities available with Silverlight and gives pointers on how to get started with them.

From March 30th to April 22nd this year, the Developer & Platform Evangelism Team at Microsoft Canada delivered a combination of all-day From Client to the the Cloud tour  and evening Community Connection Series events in 19+ cities across Canada as part of EnergizeIT 2010.

The EnergizeIT events give an idea of what’s possible.  To compliment those events, the TechDays events by Microsoft Canada coming up again this year in the Autumn season, give attendees the opportunity to learn more about how they can use Microsoft products and technologies.  I’ll be speaking there again this year on topics that may include Silverlight, Azure, OData and Windows Phone 7. 

At each of the recent EnergizeIT events, a 2.5 hour demo showed the tip of the iceberg in terms of what’s possible with some of the latest Microsoft tools and technologies from the viewpoint of developers and IT professionals.  They covered technologies and products included .NET 4.0, Visual Studio 2010 (including Lab Manager), Hyper-V, Windows Mobile, Office 2010, SharePoint 2010, PowerShell, System Center, the Windows Azure Platform and Silverlight.

The demo covered the user, developer and IT pro experience for a new car insurance business.  It showed how a consumer could use software on a Windows Mobile device to capture critical information when a collision occurs as well as how they can review and connect with the insurance company back at home.  It continued to show the construction of the application on the backend, how the back office workflow can operate, and how the application can be deployed to the cloud to take advantage of various benefits.

About two months before EnergizeIT, the DPE team contacted me to produce the Silverlight portion of the demo.  I had the pleasure of working closely with Christian Beauclair and Rick Claus to integrate the Silverlight application into the demo experience.

The user experience starts when they use their Windows Mobile device to capture collision incident information and submit a claim to the insurance company which is stored it in a SQL Server database via WCF Web Services and ADO.NET Entity Framework.  You can read about the mobile application portion in Mark Artega’s blog post

The Silverlight experience begins when the user gets home and follows up with the insurance company on their home computer.

First the user logs into the application…

20100514 login 

To reflect the ‘electric energy’ style of the the Energize ‘brand’ and the logo, the UI reveals areas using a specific ‘energy bar’ animation.  This grows from a spot…

20100514 reveal 1

…to the full width of the element to be revealed…

20100514 reveal 2

… and ‘materializes’ the element as the energy bar sweeps down over the area…

20100514 reveal 3

… after which the energy bar then shrinks until it disappears.  We joked about putting a ‘vudgzzz’ sound with this, but the demo didn’t have sound up. 

20100514 reveal 4

The Silverlight application uses ADO.NET Data Services in Silverlight 3 (now WCF Data Service in Silverlight 4 including OData support), to pull down a series of connected entities including a customer record, policies, claims, related employees, pictures, etc.  You can see how the sections of this application UI could lend themselves to display on Windows Phone 7.  The policy type icons are XAML resources bulit into User Controls, built from vectors allowing for a great scaling experience.  Unfortunately the release of Silverlight 4 was too close to the tour launch for us to use Silverlight 4 features like global implied styling.

20100514 home

When the user select the Claim activity, an animation storyboard acts on the UI to fade it and tilt it away using the Perspective 3D capabilities in Silverlight 3…

20100514 fade back

… and the claim details are revealed.  This includes binary image data transfered from the backend database.  The geospatial data in the claim is used with the Bing Maps Silverlight control to show the location of the collision on a map (with full zoom and pan support aloing with road and aerial views).

20100514 claim

It would then be possible to store updated information back to the SQL Server database via the WCF Data Service wrapping around the ADO.NET Entity framework model wrapping the database.

The asynchronous nature of all network calling libraries in Silverlight ensures that the user interface does not freeze up when the application is talking to services in the cloud.

The demo goes on to demonstrate a chat session between the user and an insurance adjuster which results in an appointment being placed in the users pending activities list.

This demo application scratches the surface of what’s possible.  Features like mic/webcam capture, WCF RIA Services, Templating, Deep Zoom, DRM, Streaming A/V Support, Printing, Out-of-browser execution, etc. really empower developers to take Silverlight to the max.

In upcoming series posts, I’ll give you pointers on the Silverlight experiences and capabilities of this application and the technologies it uses.

Released Today: Silverlight 4 RTW, Tools RC & Blend 4 Preview Update

Silverlight 4 went RTW (Release to Web) today – you can find it on the silverlight.net site.

What was not widely discussed is the fact that the Silverlight 4 Tools for Visual Studio 2010 release is officially an Release Candidate, not yet officially an RTW quite yet, though may be declared one if no major issues are found.

Scott Guthrie detailed this in the Channel 9 Live broadcast following the Silverlight 4 launch event.  Go to the Silverlight 4 launch video and select the Channel 9 Live On Demand option, then skip ahead to 01:34:30 where he talks about these 3 things.

Silverlight 4 Final Release on 15th 2010

Today, during the Day 2 Keynote of the DevConnections event in Las Vegas, Microsoft announced that Silverlight 4’s final release will be on April 15th this week and available to download.

I think many people were hoping for a release today, but oh well…

Today’s live streamed keynote included demonstrations of Silverlight 4’s features and associated productivity enhancements in Visual Studio 2010.

Note that there will also be an ‘RC’ Tools release for Visual Studio and an Expression Blend 4 Preview update.

I’m Going to Mix10

A last minute decision…

I won’t be live blogging but may be live tweeting – @colinizer.  I’ll blog later in the evening.

I’ve been getting in the conference spirit recently (DevTeach, code camps, etc.), and I can work around the conference hours so… why not…  mixmas only comes once a year :-).

If anyone wants to meet up – DM me on twitter or email me if you know how ;-).

Strike I for Microsoft-Developer Relations on Windows Phone 7 Series

I want a Windows Phone 7 Series OS Mobile Phone 7 Phone Windows phone thingy…

I’ll also be lined up to develop application for it too.

However, from the Mix10 blog for the Mix10 event where the development story is scheduled to be officially unveiled (with my highlighting):

Join us at MIX10 and be among the first to learn how to build applications and games for Windows Phone 7 Series. We’ll introduce you to the development platform, show you how to work with the Windows Phone 7 Series development tools, and give you a tour of the Windows Phone Marketplace. All MIX10 attendees will receive access to the Windows Phone 7 Series development tools and have access to a dedicated track on the Windows Phone 7 Series platform that runs throughout the event.
MIX10 attendees will get exclusive free developer support for the Windows Phone 7 Series development tools. Don’t miss this unique opportunity to be among the first to learn about Windows Phone 7 Series.

The first highlight shows a lose-lose statement.


Microsoft risks shunning the hordes of non-Mix-attendees (who didn’t go for many potentially important reasons), by delaying their access to the tools.


Microsoft risks shunning the Mix-attendees because everyone else will undoubtedly get the tools very quickly (if not immediately) if Microsoft is serious about gaining developer support in a short time.


So it really seems like an attempt to get Mix attendance up.  Given that the discount deadline has been extended many times, it seems that getting people to these events is increasingly difficult.

Microsoft has streamed the PDC and Mix keynotes for the last 3 or 4 events now and made session videos available in about 48 hours.  Unless this is about to change, the real benefit of going to these events is business networking.  I’d like Microsoft to publish the keynote and session access numbers.

I’ll be watching and blogging the keynote(s) live.  I’d love to go, but my priorities don’t lead me there this year. 

Update: I’m going!  I’m gonna squeeze it in – so may live tweet and blog later.

The second highlighted statement (about support) is fair enough, but again, if Microsoft is serious about getting developer output in less than 6 months, it will need to offer up something – I’d suggest additional mobile-specific support incidents for MSDN subscribers.

As I mentioned in January, I’m also expecting to see a free ‘Microsoft Visual Phone Developer 2010 Express Edition’, if Microsoft really wants to give this the ground swell it needs for a proper launch.

Quick Tip for Uploading Zip Files as Multiple Files to SharePoint server 2007 or WSS 3.0 from Vista

SharePoint allows suitably configured users to upload multiple files to document librations from the Upload menu item.

Unfortunately, on Windows Vista machines, any .ZIP files will not be shown for selection.

This relates to Vista’s ability to consider .ZIP files as folders into which a user can navigate within Windows Explorer.  This means that they don’t appear with the file list for the multiple upload.

There are some registry-change methods available to work around this but I find the quickest solution to be this:

  • Rename any .ZIP file to another extension prior to upload, e.g. .ZIP2
  • Select and upload the file in the multiple file upload selection
  • Use the Open with Windows Explorer option under the Document Library’s Action menu to browse to the uploaded file on SharePoint and rename it back to .ZIP.

This may not sound like a great solution and you may wonder why one would bother, especially for a single file.  Using the Multiple File method, allows the user to see a progress bar for the upload.  Additionally, the single file upload method may time out with a large single .ZIP file.

Not ideal, but it gets the job done!

Quick Tip to Retain ASP.NET dynamic Recompile Changes During Azure Debugging

One of the major benefits of the Windows Azure SDK and Windows Azure Tools for Microsoft Visual Studio is the ability to operate an Azure Development Fabric and Azure Development Storage emulation on your local machine.  Pressing F5 in a Visual Studio Azure project deploys and runs your application in an environment emulating the real Windows Azure.  This is somewhat similar to the ASP.NET Development Server that starts up and somewhat emulates IIS (or other ASP.NET hosting environment) when you debug an ASP.NET application.

This is great, but can also create an efficiency bottleneck during development.

If you are debugging a regular ASP.NET application and you need to make changes, in many cases you can stay in debug mode;  you can edit an ASPX page or other assets (including CSS) and simply refresh the already running web browser instance to see you changes.  In the case of the ASPX page having changed, it is dynamically recompiled when you next access it.  This works because the ASP.NET Development Server is pointing at your development files.  This efficient cycle is lost when you start debugging with the Windows Development Fabric…

When you debug (or run) an Azure project in Visual Studio, your application is built into a package that is ‘deployed’ to the local Azure emulation.  The emulation therefore uses its own copy of the files.  Making changes to the file in Visual Studio while debugging, only updates the copies under Visual Studio’s control – they are neither repackaged nor redeployed.  The Azure Development Fabric has no idea that they’ve changed.  So, you have to stop debugging, re-launch, wait for the new package to build and deploy, and then get back to the same place in the application.

Here’s what likely amount to a satisfactory workaround before you are ready for the emulation stage:  create a mock for the Data Access Layer that deals with Windows Azure Storage and debug your project outside of the Azure Development emulation.  You lose role instance configuration, but you can go back to using the ASP.NET Development Server.  You may also lose the Azure diagnostic logging – but you can mock that too.

Note:  If you are using SQL Azure, for the most part you can use a regular local SQL Server in place.

I’m not suggesting you mock the interfaces to the Azure APIs directly.  Your application may well have a Data Access Layer which (when following best practices), will likely have an interface.  I suggest you create an object to mock this using the same interface or perhaps use one of the available mocking frameworks.

To facilitate the selection of the polymorphic DAL objects (real or mock) in one code-base you’ll likely want to make your application smart enough to know if it’s running in the Azure environment (Microsoft or local emulation) or not.  My previous post on the topic explains this idea.

You’ll need an interface that suits the operations of your DAL such as this example (where WallMessage is defined elsewhere)…


a mock object (such as the example shown below) and a real object (not shown) that both implement the interface…


and then calling code that first selects the mock or real object to use based on environment detection……


after which you go on to use properties and methods on the selected interface oblivious to the implementation being used.

This is just a basic example and as mentioned, there are some very good Mocking frameworks as well as Dependency Injection frameworks available that ease this kind of setup in large or complex solutions.

The code shown is from the sample Silverlight application I provide (including source code) in my Azure Deployment Guide, already used by 100s of people to successfully deploy their first Azure application.

I hope you found this tip useful 🙂 If so, and you’re reading this on January 15th 2010 then please vote for my Mix 2010 conference submissions today! :)  Thank you.

Looking to learn more about the Windows Azure Platform, Silverlight, Windows Touch or Windows Identify Foundation?

If you’d like to see these sessions in person at Microsoft’s Mix 2010 conference or the recordings that will likely be made available for free later on, please vote for the sessions before January 15th 2010, by going to the site, adding the 3 sessions to you ballot and submitting it