Data Exchange for Application Extensibility on Windows Phone and Windows

Data Exchange for Application Extensibility on Windows Phone and Windows

Both Windows and Windows Phone support launching applications based on file extensions or via a custom uri protocol. This is the equivalent of “open in” capability that other platforms have and it is a fundamental mechanism for sharing data from one application to another. For example you might have a dropbox application which can list various files but doesn’t provide a mechanism for opening or editing all possible file types. Instead when a user clicks on a file to open it, the application can simply attempt to launch the file, allowing the platform to pass off the file to the appropriate application. This is implemented by taking a copy of the file and passing it to the destination app. Unfortunately this then means that the view/editing application can’t save it back to dropbox. The round-about way to save the changes is to then launch the file, this time with the file being picked up by dropbox.

What’s interesting is that this is expressly prohibited by the Windows Store App certification requirements. Point 3.1 states that applications can’t implement bi-directional data exchange:

image

My view is that this clause was written by a completely different team (probably a security “expert”) to the one that actually implemented file/uri handling and doesn’t really understand why they were implemented in the first place. In Windows you can implement Share contracts but this is not really a great way to data exchange between apps – it works well for “share to social” or similar scenarios. Take the Facebook Login for Windows Phone this uses bi-directional data flow to authenticate users via Facebook for applications wanting to connect to Facebook (similar to the way iOS works for Facebook auth). With the current Windows Store requirements I don’t see this as being possible.

 

References

Auto-launching apps using file and URI associations for Windows Phone 8

Auto-launching with file and URI associations Windows Store apps

Getting Started with Design for Windows, Windows Phone, iOS and Android

Getting Started with Design for Windows, Windows Phone, iOS and Android

Here’s a summary of some of the design guidelines for the various mobile platforms:

Windows Phone
http://developer.windowsphone.com/en-us/design

Windows
http://msdn.microsoft.com/en-au/windows/apps/hh779072.aspx

Android
http://developer.android.com/design/index.html

iOS
https://developer.apple.com/library/ios/design/index.html

 

Another great resource on user experience design is the UX Mastery website

http://uxmastery.com/

In particular the book Everyday UX is worth purchasing:

http://uxmastery.com/everyday-ux-remarkable-people-telling-their-stories/

Much needed updates to the Windows Store

Much needed updates to the Windows Store

Just in case you missed the announcement regarding changes to the Windows Store: More control for app developers in the Windows Store

The main updates are

*    Setting your app’s release date and time
*    Managing your app’s availability
        – Temporarily removing the app from store
        – Support for Windows 8 (ie only show a Windows 8.1 listing)
*    Simplified certification requirements

RateMyApp Control for Windows Phone

RateMyApp Control for Windows Phone

Earlier this month I posted on how to Boosting Reviews of your Windows Phone Application using the MarketplaceReviewTask Launcher.

Across on the Nokia developer wiki there is an article talking about the RateMyApp component that is available for Windows Phone (http://developer.nokia.com/Resources/Library/Lumia/code-examples/rate-my-app.html). Essentially this makes the process of directing your users to rate and review your app after a number of application runs as simple as adding a NuGet package and adding a control to the main page of your application.

Here are a couple of pointers:

DO make sure you call the Review method on the FeedbackHelper class rather than directing users via the MarketplaceReviewTask. Using this method makes sure they don’t see the RateMyApp prompt at a later stage.

DO NOT use the standard prompts. It’s generally deemed to be bad practice to suggest what rating to give your app. You’re better of controlling when they see the rate/review prompt so that they’re more likely to give you a good rating when your app works for them.

Non-Blocking Initialization Code to run at Startup on Windows Phone

Non-Blocking Initialization Code to run at Startup on Windows Phone

One of the challenges often faced by developers is that they have code that needs to run at startup. This code typically has to run before any page begins to load its content; it has to support deep – linking, so shouldn’t be page dependent; and should never block the UI (which if done for long enough would cause the app to crash). In this post I’ll show you one way to achieve this – I’m sure there are plenty of other options.

In the constructor for the application make a call to your initialization method. This initialization method will return almost instantaneously since it simply spawns another thread.

public App()
{
    // Standard init code for a Windows Phone app …

    // This can be called here since all it does is pass off to another thread for the long running tasks to run.
    // If this code requires the app to be further in the lifecycle, then you may need to
    // move to launching/activating event handlers
    InitCodeThatTakeAWhile();

}

And now for the initialization method. As mentioned, the first thing it does is to spawn another thread using Task.Run. Despite warnings from Resharper we do not await this call, since this would prevent the app from initializing correctly. Inside the Run we can do whatever we want to initialize the application. When it’s done, it simply calls Set on the ManualResetEvent.

private static readonly ManualResetEvent initWaiter = new ManualResetEvent(false);
private async void InitCodeThatTakeAWhile()
{
    // DON’T wait, or you’ll block the caller
    Task.Run(async () =>
    {
        // Put init code here – can take as long as you want
        await Task.Delay(10000);
        initWaiter.Set();
    });
}

The App class also exposes a method which is used to wait for the ManualResetEvent to be set. It does this on a separate thread, thus allowing any UI code to continue to execute.

public  static async Task WaitForInitToFinish()
{
    // Switch to a different thread to wait, thereby allowing UI to process
    await Task.Run(() =>
    {
        initWaiter.WaitOne();
    });
}

Lastly, we need to invoke the wait method. This should be done on any page which is, or could be, used as a startup or launch page for the application. In fact, you could create a base class and call the WaitForInitToFinish method by overriding the OnNavigtedTo method.

protected async override void OnNavigatedTo(NavigationEventArgs e)
{
    base.OnNavigatedTo(e);

    // Change to loading states….
    LoadingText.Text = "Loading….";

    // Wait for init to complete
    await App.WaitForInitToFinish();

    // Now do page init code
    LoadingText.Text = "Loaded";
}

This strategy is useful for triggering startup logic, whilst ensuring the UI doesn’t block

Data Validation and Visual States for Windows Phone and Windows

Data Validation and Visual States for Windows Phone and Windows

One of the developers we’ve been working with recently suggested incorporating the INotifyDataError interface into some of the view models on a particular project. As a lot of the applications we typically  work on are more consumption style applications I haven’t seen the need to add complex data validation logic; where we do need to validate one or two values we typically just have a different visual state that represents when the user hasn’t correctly filled in the required fields.

I just had a quick hunt and found http://dotnet-redzone.blogspot.com.au/2012/12/windows-phone-8-easy-and-intuitive-way.html. This post is a great starting point for implementing visual states into a Windows Phone project. A number of controls support data validation. For example the TextBox has a ValidationStates visual state group, with states for valid and invalid data. The default template doesn’t specify what these states look like but it would be easy to modify the template to provide a visual indicator when data doesn’t validate.

Modifying the validation states for a control is fine for individual controls but if you need to modify the visual state for the rest of the page you’d need to capture the ErrorsChanged event and change the visual state of the page.

One of the biggest weaknesses of the data binding framework for both Windows and Windows Phone is that there isn’t a built in mechanism for changing visual states from within a view model. There are some solutions, such as data triggers or raising an even that is captured by the page and converted into a state change. These could be combined with the ErrorsChanged event in order to build a more versatile data validation framework.

Top Social Apps for Windows Phone from fellow MVP

Top Social Apps for Windows Phone from fellow MVP

image

Having recently published his Windows Phone client for Tinder, I figured it’d be worth calling out some of the awesome apps Rudy Huyn has produced. I already knew most of the popular apps but what surprised me was that none of the app he’s got listed have a rating of under 3 stars. Great work Rudy – here’s a couple of the more recognisable apps for you to download and try.

6snap6tag6sec6tindrWikipedia

Windows Phone Page Lifecycle, Tombstoning and Data Caching

Windows Phone Page Lifecycle, Tombstoning and Data Caching

The title of this post sounds a little weird but is actually quite fundamental to how you develop for Windows Phone. Most training content/courses for Windows Phone seem to focus unnecessarily on the application wide events of launching, closing, activating and deactivating. These are useful to get an understanding of what tombstoning is and why it happens. However, in most cases what’s more important is knowing and understanding the page methods which you can override to intercept the page lifecycle, namely OnNavigatedTo and OnNavigatedFrom. These methods always occur as a pair and as such make a useful point at which to save and restore page data.

Let’s assume we now know that we are going to save and restore information in the OnNavigatedFrom and OnNavigatedTo. The next question is what data are we going to load and where to load it from. So now we need to look at different scenarios:

First time arriving at a page

The only thing you should rely on absolutely is the navigation uri for the page (look at the navigationeventargs). This should tell you all the information you need in order to load the data for the page. It might include a product id, a serialized object or some other identifier of the data you want to load.

Using the information from the navigation uri you then need to load the data for the page. This might come from:

– an in-memory application wide store (eg repository model)
– loaded from cached data on disk
– retrieve data from a service

Notice that these are in order of increasing latency. To make your applications appear more responsive you need to think about how you can cache content in memory and/or disk before calling out to a service

Leaving a page

When you leave a page there are two options:

– Forward navigation to some other page and/or application – in this case you need to cache the current data for the page in the State dictionary for the page. When the user comes back to the page, you should retrieve the information from the State dictionary and use it to populate the page. The advantage of the State dictionary is that it automatically handles Tombstoning for you!

– Backward navigation – in this case it’s up to you as to whether you cache the data or not. Caching the data has the advantage that if the use goes to that page again, the data can be loaded very quickly (eg browsing to the same news article again). You can’t use the built in page State dictionary for this because each time you navigate to a page, it will get an new State dictionary, so you’ll have to come up with your own caching mechanism.

Returning to a page

This is similar to arriving at a page, with the only exception that you need to look in the State dictionary first.

The important take away from this post is that looking up data should be a progressive action: start with the page State dictionary; then to an application wide in-memory cache; next look to disk; then call to a service.

Fiddler and Proxies for Windows Phone

Fiddler and Proxies for Windows Phone

This article from last year is a great starting point for addressing issues either with proxies or for accessing network traffic from the Windows Phone emulator: http://blogs.msdn.com/b/wsdevsol/archive/2013/06/05/configure-the-windows-phone-8-emulator-to-work-with-fiddler.aspx

Probably the missing piece for most people is step 4:

In the command windows on the bottom left corner of Fiddler type: prefs set fiddler.network.proxy.registrationhostname HostName where HostName is the name of your desktop computer

Then you can simply navigate to :8888/FiddlerRoot.cer">http://<yourhostmachinename>:8888/FiddlerRoot.cer to install the Fiddler root certificate (useful for SSL debugging!)

Visual States in Windows Phone and Windows Applications using MvvmCross

Visual States in Windows Phone and Windows Applications using MvvmCross

I’m a big fan of using Visual States defined in Blend to be able to see all the different states that a page/view within your application would look like under different conditions. Most of these conditions are reflected in the state of your view model. However, there is no built in mechanism for data binding to a visual state. There are a number of different ways to tackle this problem, for example data triggers to control state changes. On technique we’ve used quite successfully is to simply bubble up appropriate state changed events from the view model, which in turn triggers a state change at the page level. In this post I’m going to walk you through how we’ve extended MvvmCross to include our own base view model and base page which allows us to trigger and track the state of the page.

We’ll start by defining an interface which will be implemented by our base view model. This includes the StateChanged event and methods for invoking a state change, ChangePageState, and querying the current state, CurrentState. You’ll notice that these methods take a type parameter, this is so that we can use an enumeration, rather than string literals to define our states.

public interface IStateAndTransitions
{
    event EventHandler<DualParameterEventArgs<string, bool>> StateChanged;
    void ChangePageState<T>(T stateName, bool useTransitions = true) where T : struct;
    T CurrentState<T>() where T : struct;
}

Next, we’ll implement the IStateAndTransitions interface in our BaseViewModel class. This class also inherits from MvxViewModel, bringing with it all the goodness of MvvmCross.

public class BaseViewModel : MvxViewModel, IStateAndTransitions
{
    public event EventHandler<DualParameterEventArgs<string, bool>> StateChanged;

    private readonly Dictionary<string, string> currentStates = new Dictionary<string, string>();
    public T CurrentState<T>() where T : struct
    {
        var current = currentStates.SafeDictionaryValue<string, string, string>(typeof(T).FullName);
        var tvalue = current.EnumParse<T>();
        return tvalue;
    }

    public void ChangePageState<T>(T stateName, bool useTransitions = true) where T : struct
    {
        var current = currentStates.SafeDictionaryValue<string, string, string>(typeof(T).FullName);
        var newState = stateName.ToString();
        if (string.IsNullOrWhiteSpace(current) || current != newState)
        {
            currentStates[typeof(T).FullName] = newState;
            StateChanged.SafeRaise(this, newState, useTransitions);
        }
    }
}

The last thing to do is to extend the MvxPhonePage to wire up an event handler for the StateChanged event. The event handler simply invokes the state change by calling GoToState on the VisualStateManager.

public class BasePhonePage : MvxPhonePage
{

    protected IStateAndTransitions StatesAndTransitionsViewModel
    {
        get
        {
            return DataContext as IStateAndTransitions;
        }
    }

    protected override void OnNavigatedTo(NavigationEventArgs e)
    {
        base.OnNavigatedTo(e);

        var satvm = StatesAndTransitionsViewModel;
        if (satvm != null)
        {
            satvm.StateChanged += ViewModelStateChanged;
        }
    }

    private void ViewModelStateChanged(object sender, DualParameterEventArgs<string, bool> e)
    {
        //var controlName = e.Parameter1;
        var stateName = e.Parameter1;
        var useTransitions = e.Parameter2;

        // Locate the control to change state of (use this Page if controlNAme is null)
        Control control = this;
        VisualStateManager.GoToState(control, stateName, useTransitions);
    }

    protected override void OnNavigatedFrom(NavigationEventArgs e)
    {
        var satvm = StatesAndTransitionsViewModel;
        if (satvm != null)
        {
            satvm.StateChanged -= ViewModelStateChanged;
        }

        base.OnNavigatedFrom(e);
    }
}

For completeness you’ll also need the parameter and dualparameter event args classes. These are used to make it easier to pass data values around when raising events.

public class ParameterEventArgs<T> : EventArgs
{
    public T Parameter1 { get; set; }

    public ParameterEventArgs(T parameter)
    {
        Parameter1 = parameter;
    }

  public static implicit operator ParameterEventArgs<T>(T parameter)
    {
        return new ParameterEventArgs<T>(parameter);
    }
}

public class DualParameterEventArgs<T1, T2> : ParameterEventArgs<T1>
{
    public T2 Parameter2 { get; set; }

    public DualParameterEventArgs(T1 parameter1, T2 parameter2):base(parameter1)
    {
        Parameter2 = parameter2;
    }

    public static implicit operator DualParameterEventArgs<T1, T2>(object[] parameters )
    {
        if(parameters==null || parameters.Length!=2) return null;
        return new DualParameterEventArgs<T1, T2>((T1)parameters[0], (T2)parameters[1]);
    }
}

Now, let’s see this in action in a view model, FirstViewModel:

public class FirstViewModel : BaseViewModel
{
    public enum FirstStates
    {
        Base,
        Loading,
        Loaded
    }

    public async Task LoadData()
    {
        ChangePageState(FirstStates.Loading);
        // Load some data (async to ensure no UI blocking)
        ChangePageState(FristStates.Loaded);
    }
}

Your page, FirstView, needs to inherit from BasePhonePage and have visual states called Loading and Loaded. The “Base” enumeration value is there just to represent the default state of the page. You should never have a state called “Base”, nor should you call ChangePageState with a value of Base. You can however, call CurrentState and compare the value to Base to see if a state has been set.

Hope this makes it easier for you to build your visual states in Blend.

Nokia Lumia Black Update and App Folder

Nokia Lumia Black Update and App Folder

From Nokia: http://conversations.nokia.com/2014/01/09/lumia-black-update/

The one thing that I thought was “cute” was the App Folder idea. If you recall clustering apps into folders/groups has been around since almost the beginning of guis (eg you could group programs in Windows 3.11). Which is why Apple was ridiculed when it claims that introducing folders was innovative.

I’m not saying App Folderis at all innovative but it can be a useful feature to the platform. Unfortunately it does require apis that aren’t available to third party developers to build this functionality which is why it had to wait for Microsoft or Nokia to build it. I do live the fact that it doesn’t require an OS refresh in order to get this app. I also like the fact that the images on the folder tile are big enough to see what’s actually in there, particularly with the wide tile. Here’s mine for games…..

image

Querying data from the Windows Phone and Windows Stores

Querying data from the Windows Phone and Windows Stores

We had a requirement today to query both the Windows Phone and Windows Stores for information about some of the apps we’ve been working on. Since both stores have a rich client interface it’s only natural that the store can be queried via a hidden pseudo api (“pseudo” because they’re more feed-like than a real api).

To work out how the api is structured the easiest thing to do is to setup Fiddler with SSL decoding and remote connections enabled on one computer and then on your Windows Phone and/or Windows 8 device you set the Fiddler computer to be the proxy. In order for this to work you’ll need to install the Fiddler certificate onto the device (Windows Phone installs the certificate correctly by default; Windows 8 you’ll need to put the certificate into the Trusted Root Certificate Authorities store for it to work).

Here’s what I pulled from my Windows Phone:

Application Info URL

http://marketplaceedgeservice.windowsphone.com/v8/catalog/apps/{app guid}?os=8.0.10211.0&cc=AU&lang=en-US

Replace “app guid” with the Guid for your application. You can find the Guid for your application by finding the application in the web version of the Windows Phone Store and then looking in the address bar.

Image URL

http://cdn.marketplaceimages.windowsphone.com/v8/images/{image guid}?hw=486577666&imagetype=icon_small

Replace “image guid” with the Guid for the image you want to retrieve. The image Guids are listed in the information returned from the application info URL.

 

Here’s what I pulled from my Windows 8 device:

Application Info URL

https://next-services.apps.microsoft.com/browse/6.3.9600-0/776/en-GB_en-AU.en-US.en/c/AU/cp/10005001/Apps/{app guid}

Replace “app guid” with the Guid for your application. You can find the Guid for your application by finding the application in the web version of the Windows Store and then looking in the address bar.

Image URL

http://wscont1.apps.microsoft.com/winstore/1.4x/{image path}

Replace “image path” with the relative path to the image that you want which can be found in the Application Info URL

Boosting Reviews of your Windows Phone Application using the MarketplaceReviewTask Launcher

Boosting Reviews of your Windows Phone Application using the MarketplaceReviewTask Launcher

One thing that so many developers forget is that reviews are a crucial element in driving the adoption of your application. Not only do a lot of developers forget to provide a link to submit a review within their application, they also don’t prompt the user to post a review. Here’s a simple suggestion that should help drive reviews:

– Make sure the user can navigate to the Windows Phone Store review page for your application from somewhere within your application

– Prompt the user to complete a review based on some algorithm eg:

         > After X days of using the app

         > After running the app X number of times

         > After successfully completing something within the app

The simplest way to navigate users to the review page is using the MarketplaceReviewTask:

MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask();
marketplaceReviewTask.Show();

Windows Store In App Purchase ArgumentException when calling LoadListingInformationAsync

Windows Store In App Purchase ArgumentException when calling LoadListingInformationAsync

When you couple poor API documentation with dumb developer decisions you can cause developers to waste hours trying to diagnose issues with their apps. We’ve just tracked down an issue with calling CurrentApp.LoadListingInformationAsync from a Windows Store application we’re building. Whilst calling the same method on the CurrentSimulatorApp works without throwing exception, calling the method on CurrentApp throws an ArgumentException with message "Value does not fall within the expected range."

Initially we thought that this issue was related to the app not being published in the Store, so we submitted and published the app. Unfortunately the exception continues….

This thread: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/0de52a76-2ec3-4b82-8d38-7385f22132f0/currentapploadlistinginformationasync-throws-argumentexception

holds the answer – you need to call this method from the UI thread.

Points to remember when building an API:

– You shouldn’t design an API that needs to run on the UI thread, that isn’t UI related

– You should document possible exceptions

– If you’re going to provide a simulator API

    – The simulator should implement an interface so it can be mocked properly

    – The simulator should mirror the behaviour of the real thing (in throw similar exceptions!)

Windows Phone Dev Fusion

Windows Phone Dev Fusion

Some of the Windows Phone MVPs are putting together some awesome online content later this month

“Along with Christmas we have a little gift from the Windows Phone development community for you: The WPDev Fusion „New Year Edition“, supported by Microsoft and Nokia. This is an evolution of the Windows Phone Week from last october, where over 1500 developers participated in. But these events also have a few downsides: You have to be at a specific time at a specific place in conjunction with travel costs. Here actually WPDev Fusion comes into the game as this event is pure virtual. Relaxed from your couch you can join this global event on January 22nd.”

More info at http://winphonedev.de/2013/12/23/ankndigung-zu-wpdev-fusion-new-year-edition-announcing-wpdev-fusion-new-year-edition/

Windows Phone goes BIG with 1080p resolution

Windows Phone goes BIG with 1080p resolution

Windows Phone 8 applications will, out of the box, automatically scale on these high resolution devices. But what if you want to make use of this extra resolution, particularly on larger devices such as the Lumia 1520. Here are some links to some useful guidance on how you can take advantage of the extra space:

Taking Advantage of Large-Screen Windows Phones

Porting Existing Apps to large Screen Device

Simulate 1080p windows phone emulator

Windows Phone Application Testing

Windows Phone Application Testing

Here’s a couple of useful links on testing for Windows Phone applications:

Unit testing for Windows Phone apps

Options for publishing Windows Phone beta apps and testing in-app purchase

Nokia: Remote Device Access

One additional comment I would make about unit testing for Windows Phone is that unfortunately the tests written using a Visual Studio Windows Phone unit testing project can’t be executed (easily) as part of a Visual Studio Online automated build. The work around for this is to place most of your business logic in a Portable Class Library and to simply use a regular unit testing project to test the functionality. Of course, this isn’t as accurate as testing using either the emulator or a real device but it will give you some level of regression testing with each build (ideally after each check in).

Conditional Includes with Visual Studio Project Files

Conditional Includes with Visual Studio Project Files

Often during development your application may be set to connect to a dev or test set of services. When you go to release your application you’ll then switch to point to the production or live set of services. A common way to do this is to define a constant which is the base url for the services and then use the DEBUG conditional compilation constant to control what the value of the constant is. For example

public static class Contants
{
#if DEBUG
    public const string BaseUrl = "
http://test.apiservice.com";
#else
    public const string BaseUrl = "
http://production.apiservice.com";
#endif
}

This is a simple but effective strategy to control which services are used based on build configuration. If you select a Debug build, you’ll connect to the test services; the Release build will connect to the production services. This strategy also keeps the differences between a debug and release build to a minimum, since all that is changing is the base url for the service. However, this simplicity can lead to some confusion as it can be hard to tell whether you’re using a debug or release build of an application.

One work around for this is to surface up the base url in the UI, for example in the About page, so that you can tell which version of the app is running. Another alternative is to customise the default tile for the application so that it is clear which build is installed. This can be done by dynamically switching between multiple image files during the build process.

Let’s start by creating our two live tiles (one for debug, one for release):

FlipCycleTileMedium FlipCycleTileMedium

Create the following folder structure in the solution folder:

DefaultTiles
         Debug
               FlipCycleTileMedium.png
         Release
               FlipCycleTileMedium.png

Place the created images into the appropriate folder – note that they should have the same file name.

In Visual Studio, right-click on the project node and select “Unload Project”. Then right-click the project node again and select Edit. Locate where the live tile image is included eg:

<Content Include="AssetsTilesFlipCycleTileMedium.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

And replace it with the following xml

<Content Include="..DefaultTiles$(Configuration)FlipCycleTileMedium.png">
  <Link>AssetsTilesFlipCycleTileMedium.png</Link>
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

This xml links in the appropriate file based on the $(Configuration) parameter. Save and reload the project. Now as you switch build configurations you’ll see that the appropriate live tile image is included. You can check this by either deploying the application to a device/emulator, or by checking the output folder where you’ll see the appropriate file appear after the build has completed.

App Generators: Windows Phone App Studio and Project Siena

App Generators: Windows Phone App Studio and Project Siena

With all the recent interest in app generators by Microsoft, I’m wondering whether there is going to be a run on app-kiddies (kick back to “script kiddies” who plagued the internet a decade or so ago): Application builders who don’t have a clue how to write an application but seem to be able to coble together a number of applications, that all look surprisingly similar, using generators.

The two app generators I’m referring to are:

Windows Phone App Studio

“Take your app from idea to Windows Phone in record time”

Microsoft Project Siena (Beta)

“Unleash your expertise and imagination”

Having checked out the capabilities of these generators I don’t feel that my job as a Windows platform developer is in jeopardy. In fact, I think these generators allow would-be app creators to get started with the basics. Once they hit the limitations of the tools, that’s when they can come to us to fill out the gaps. This is a great way to test a concept, or two, before over-investing in any particular idea.

Windows and Windows Phone app convergence

Windows and Windows Phone app convergence

One of the things that is becoming apparent is that the convergence between Windows and Windows Phone applications it a hot topic. Developers often ask why we have two development platforms to target, where as iOS and Android only have the one. For example iOS you can build a single package which includes both iPad and iPhone versions of an application. This argument is of course completely flawed since we’re comparing apples and oranges. If you widen the scope to include Mac development then those in the Apple world also have to target two platforms. This argument doesn’t really apply to Android since it doesn’t really feature in the desktop space.

What we are seeing is that we can increasingly share resources between our Windows and Windows Phone applications. The continual evolution of Portable Class Libraries mean that we can build reusable libraries that will work without recompilation across both Windows and Windows Phone applications. In fact you can even use these libraries in your iOS and Android projects, assuming you’re using Xamarin as your cross platform approach.

Unfortunately all this discussion of convergence at an dev platform layer completely ignores what’s going on at the user experience level. The reality is that you don’t need technology convergence in order to build a consistent user experience across both platforms. What’s been interesting to watch is how Microsoft tries to converge the look of Windows and Windows Phone first party applications. Whilst  both interfaces are laced with the essence of Metro Modern UI, there are some significant differences between them.

Take for example the Hub/Panorama experience – Windows 8 didn’t have a control for this, where as Windows Phone has the Panorama control; Windows 8.1 now has the Hub control which makes it easier for developers to build a hub style experience. The Hub and Panorama controls aren’t the same eg the hub control typically has a hero pane, where as the panorama has a background image which has parallax scrolling.

If you look at some of the Microsoft applications, such as Bing News, you’ll see that they’ve taken UX convergence to the next level, attempting to minimize any difference between the platforms. Below you can see the Windows Phone Bing News app, followed by the Windows version.

1 of 6 2 of 6 3 of 6

 

Screen shot 1

The question you should be asking (and Microsoft should be answering) is whether you should be sticking to the standard Panorama look and feel, or should you be trying to match what Bing News is doing and aligning with the Windows Hub control?