Nick's .NET Travels

Continually looking for the yellow brick road so I can catch me a wizard....

Debugging Internet Explorer on Windows Phone 8.1

The desktop version of Internet Explorer now has quite a good selection of developer tools available on any site by just pressing F12

image

Unfortunately on Windows Phone it’s been quite difficult to debug websites and so developers typically had to resort to alert(‘hello’); style debugging. With Update 2 for Visual Studio 2013 there is a new Debug menu item “Debug Windows Phone Internet Explorer”

image

This gives you the option to select the device/emulator and specify a launch site to debug.

image

The debugging experience is pretty cool as it’s actually in Visual Studio and includes the ability to set breakpoints and inspect variables.

image

Do also get the DOM Explorer

image

And the Javascript Console

image

This has got to make our jobs easier!

Upcoming Windows Platform Events for Windows and Windows Phone

Hot off the heals of //Build/ are a whole slew of local activities to get you updated and building for the new Windows platform (aka Windows and Windows Phone). Here they are:

24th April 2014    //Learn/ 

Whether you are a New Windows App Developer or an Experienced one- we have something for you!

Join us and take a deep dive into the latest features and technologies for Windows Phones, PCs and Tablets.//learn/ from our community in this “to the community, for the community and by the community” event where our MVPs and Expert Developers will help you better understand all that’s new with Windows.

Want to learn how to easily share code between store apps of different form factors? or Want to build your own Universal App? You are at the right place. These sessions will cover all the basic concepts to develop Universal Windows apps –One App for all form factors (PC, Table and Phone), Windows Phone 8.1 apps: the new application lifecycle, the new XAML etc.-with live chat and Q&A with our speakers

No need to dress up or step out you can watch and learn from the comforts of your home/office in this online webcast of informative sessions delivered by our community experts. That’s not all, our local experts will deliver these sessions in not 1 but 8 languages from across the globe(each accommodating the local time zone) to help you learn and leverage the new features and technologies.

So get started and Register Now!

17th May 2014    //Publish/

Locations TBA but Sydney, Melbourne and Brisbane are likely – more announcements to come

Whether you’re looking for expert guidance to help you get started or to cross the finish line at a local event, Microsoft experts are here to help you out every step of the way.

You can even win awards and prizes just for publishing before June 1, 2014.

Windows Phone 8.1 Developer Community Workshop

2nd May 2014 – Melbourne
9th May 2014 – Sydney
16th May 2014 - Brisbane

The Windows Phone 8.1 SDK is now available, and with it brings a wealth of new features and capabilities to take your Windows Phone applications further than before.

We've taken the best from //Build, it'll be a big day, jam packed with topics including:-

  1. The new WP 8.1 runtime
  2. Universal applications and building across WP 8.1 and Windows 8.1
  3. Bluetooth and NFC and the internet of things
  4. People Hub
  5. Notifications
  6. Javascript WinJS comes to phone Geofencing And more...

With trainers from Nokia, Microsoft, Build To Roam, and your local Windows Phone super stars, you don't want to miss out. Seats are limited, so get in fast.

Speed up Blend for Visual Studio with TFS (Visual Studio Online) using a Firewall Rule

So for the longest time I’ve complained about how unusable Blend for Visual Studio is on projects that use TFS, specifically instances of TFS that are on the other side of the internet (yes, I’m looking at you http://visualstudio.com) . The issue is that every time you try to modify a file it goes off to TFS to check something…. I’m not quite sure what, but it hangs for a couple of seconds before deciding that you’re ok to make the change. This is particularly bad when you’re working with sample data.

It turns out there is a stupidly simple fix – don’t let Blend access the internet. Due credit to Dave who works with me at Built to Roam as he was the one that told me to just create a firewall rule.

Now, it’d show you some pictures of how to create the firewall rule using MMC but for some reason MMC crashes for me when I go to view the outbound rules. Anyhow, here’s the command for doing it via the command line:

netsh advfirewall firewall add rule name="Blend" dir=out action=block program="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Blend\Blend.exe"

Blend will now complain when you first open a TFS connected project but there after it won’t miss a beat as you work with files as if there is no TFS connectivity.

Built to Roam website gets a facelift with interactive Windows and Windows Phone shells

http://www.builttoroam.com

Yesterday we finally released the new version of the Built to Roam website. As most of you are aware over the last couple of years we have done a lot of work with a number of customers to help them release, or update, their Windows and/or Windows Phone applications. We wanted to showcase these as part of our interactive website, so the phone and tablet you see when the website loads are designed for you to interact with; simply tap on the phone, or swipe across and tap on the tablet, to get started

image

In interactive mode the devices move to the centre of the screen and allow you to tap through to explore information about the apps we’ve enjoyed working on. The experience for each device has been designed to reflect the interaction model of the respective platform eg the back button steps you back to the previous page.

image    image

As with all projects, there was a limit to what we could fit in the first release. As such, we made some compromises when it came to the mobile experience. Whilst the site should function correctly, particularly in portrait, the website doesn’t make good use of the available screen space. Over the coming weeks we’ll be looking to optimise the mobile experience to make it easier to browse the information on the site.

Windows Phone 8.1 Emulator

In my previous post on Windows Phone 8.1 Developer Power Tools I looked at the developer power tools that are available from within Visual Studio. In this post we’ll look at the new Windows Phone 8.1 emulator and how it is an enabler for building better applications. The first thing to note is that there are a number of different emulator images available:

image

In this brave new world of varying screen sizes Windows Phone 8.1 departs from the fixed addressable width of 480 units. Instead each device has a scale factor which results in an effective resolution – in essence this means that two devices of the same size but differing hardware resolution will display the same amount of content, whereas two devices with the same resolution but differing size, will show more/less content depending on their relative size. What this means is that we now need emulators that not only vary in resolution but also in size.

image

Here you can see both the WVGA 4inch and the 1080p 6inch alongside each other – the beauty of it being in an emulator is that it can then be resized on the screen. The thing to notice is that the 1080p emulator has an additional column of tiles which will be a typical behaviour within applications when dealing with a higher effective resolution.

The next thing to note are the additional tools that are available. Here is a quick set of screenshots – we’ll go into more details on each of these in coming posts:

image image

image image

image image

 image image

Developing for Windows Phone 8.1 using XAML

By far the most common way to build Windows Phone applications is to use XAML and C# (or VB). In this case the XAML is a variant on Silverlight, which made it very easy for developers building Silverlight applications to switch across to building Windows Phone applications. 4 years on and the number of Silverlight developers has dropped (well at least the appeal of being a Silverlight developer has), and all the focus now is on becoming a Windows developer.

Unfortunately somewhere along the lines the Windows team decided that having three XAML frameworks (WPF, Silverlight and WP) wasn’t enough and that they needed to come up with another, only marginally different, framework. This we’ll refer to as Windows XAML.

With the announcements around Windows Phone 8.1 we’re entering a new time of convergence between phone and desktop applications where we can reuse not just the code (eg Portable Class Libraries and code file sharing) but also the XAML markup. This doesn’t come for free and relies on migrating our applications, or starting new applications, using Windows XAML instead of Silverlight.

So where does this leave us? What it means is that there are now three ways to develop for Windows Phone 8.1:

1) Windows Phone 8.0 Silverlight

Use this if you want maximum reach from a single application package; you don’t need or want to use any of the new platform features. This type of application will run on all Windows Phone 8.0 and 8.1 devices.

2) Windows Phone 8.1 Silverlight

By running the  “Retarget to Windows Phone 8.1” option after right-clicking on your application in Solution Explorer, your application will be migrated forward and will run against the new runtime. This means you can take advantage of some of the new platform features without having to redevelop your application. Whilst in most cases the retargeting process doesn’t modify the behaviour of your application, you will need to verify your application functionality before publishing the new version.

Once retargeted your application will only run on Windows Phone 8.1 devices, so it is recommended that you take a backup or a branch of your code and keep the 8.0 version alive to support those users who haven’t upgraded.

3) Windows Phone 8.1 Windows XAML

New applications, not wanting to maintain backward support for Windows Phone 8.0, can be created using Windows XAML. Ideally this would be all new applications as it allows for reuse across phone and tablet. The Universal projects concept introduced into Visual studio makes it easy to share code between projects, whilst still having platform specific functionality included in the “head” projects (ie the Windows and Windows Phone projects).

There is one thing that isn’t being highlighted is that each option has some limits on what you can and can’t do. 8.0 SL projects can’t access any of the new platform features. Windows XAML can’t do things like lock screen background provider….. it’s worth reading up on this before you make a decision

Windows Phone 8.1 Developer Power Tools

Last week at BUILD, Microsoft announced the availability of Visual Studio 2013 Update 2 RC, which includes the new Windows Phone 8.1 SDK.

I’m sure there will be a lot of blog posts talking about the new Universal project, the additional capabilities introduced in Windows Phone 8.1, Windows Phone XAML applications, the new application lifecycle model etc. I want to take a different approach and talk about some of the additional tools that come with the SDK.

One of the benefits Windows Phone development aligning with Windows app development is that more of the experiences along the development lifecycle will be similar. For example from the Project menu, Windows Phone developers now have the Store sub-menu with the ability to Create App Package.

image

One of the other additions is under the Tools menu, where there is a Windows Phone 8.1 sub-menu. This includes the Developer Power Tools, Developer Unlock and the Application Development tools. Whilst the last two are not new to Windows Phone development, they can now be reached from within Visual Studio.

image

The Developer Power Tools, not to be confused with the Windows Phone Power Tools, is a standalone tool which can be used to inspect what’s going on across either emulator or device. Help is available via MSDN

image

One of the most interesting thing about these tools is that you can start them, disconnect your device, put your application through its paces in real world scenarios, then reconnect and review the data at a later stage. For example, using the Performance Recorder you can check the data you want to record (eg CPU and Power) and hit Start. You can then disconnect the device, or in this case the emulator, open and run your application, and then reconnect and Stop the recording. This will prompt you to save a .etl file which includes all the data recorded.

image

The .etl file can then be opened using Windows Performance Analyzer (just double-click the file in Windows Explorer).

image

Hopefully these tools will help you track down issue in performance and usage of your application

Coded Design Time Data using Mvvmcross for Windows and Windows Phone

A question came in today regarding the use of design time data in conjunction with Mvvmcross. My initial response was “it just works” because I assumed that everyone does design time data in Blend….. and I’m still not sure why you won’t do this, since it promotes better design by giving designers the freedom to dictate the information architecture of each page. As it happens what they were really after was a way to plug in design time data that is generated in code. Without using mvvmcross this was relatively easy using a ViewModelLocator pattern – as part of serving up the view models, you could simply change the data source to be design time data when running in the dev tools. Because mvvmcross abstracts a lot of the work involved in associating pages with view models, it also means that it’s a bit harder to wire up coded design time data. In this post I’ll provide a summary (read “crude”) way I found to do this:

The assumption here is that your Mvvmcross project follows how Stuart describes a typical project in any of his getting started videos. Essentially this means a UI project (eg a Windows Phone project), that would contain your views (eg pages) and a Portable Class Library, that would contain your view models. There is also an App class in the PCL which is used to initialise mvvmcross. In this example we’re just going to work with the FirstView and its corresponding FirstViewModel but we’re going to add in support for a service which is used to populate data. Here’s the FirstViewModel:

public class FirstViewModel
    : MvxViewModel
{
    private IDataService Data { get; set; }

    public FirstViewModel(IDataService data)
    {
        Data = data;
    }

    public string Hello
    {
        get { return Data!=null?Data.TestData:"Missing"; }
    }
}

The IDataService has two implementations: DataService and DesignData, as illustrated here:

public interface IDataService
{
    string TestData { get; }
}

public class DesignData : IDataService
{
    public string TestData
    {
        get
        {
            return "Designtime";
        }
    }
}

public class DataService:IDataService
{
    public string TestData
    {
        get
        {
            return "Runtime";
        }
    }
}

At runtime we don’t need to worry about creating an instance of the DataService as it is automatically picked up by mvvmcross and injected into the FirstViewModel constructor. However, the DesignData is a little harder to use. At design time we somehow have to coerce mvvmcross to generate the FirstViewModel and populate it with an instance of DesignData. One option would be to go down the ViewModelLocator path again and use it only at design time to create our view model using design time data. However, this is rather clumsy given we have a perfectly good DI framework that we can leverage. The other thing is we’d have to continually update it to expose properties for each view model we want.

An alternative is to use a Factory pattern coupled with a Converter to dynamically create the appropriate view model. This is a bit of a chicken-and-egg thing to describe so I’ll start with how we wire it up in the UI project. Firstly, in the App.xaml we need to create both the Factory and Converter as resources:

<Application.Resources>
   <codedDesignTimeData:DesignFactory x:Key="Factory"/>
    <codedDesignTimeData:DesignTimeConverter x:Key="DesignConverter" />
</Application.Resources>

Next, in the page we set the d:DataContext (ie the design time data context) as follows:

<views:MvxPhonePage
    x:Class="CodedDesignTimeData.Views.FirstView"
    d:DataContext="{Binding Source={StaticResource Factory}, Converter={StaticResource DesignConverter}, ConverterParameter=FirstViewModel}"
    ... >

Let’s read through what this is saying – at design time, the DataContext for this page is going to be the Factory, passed through the Converter with the parameter “FirstViewModel”. As you can imagine what we’re really saying is that we’re asking the Factory to produce an instance of the FirstViewModel that we can data bind to.

Ok, so now we know what it’s saying, let’s look at the implementation of firstly the Converter, and then the Factory itself:

public class DesignTimeConverter:IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    { 
        var typeName = parameter as string;
        if (string.IsNullOrWhiteSpace(typeName)) return null;

        var factory = value as DesignFactory;
        return factory.Create(typeName);
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        return value;
    }
}

There isn’t much to the converter, it simply passes the parameter (ie the type of the view model to be created) into the Create method on the Factory object.

public class DesignFactory
{
    private Core.App app;
    public object Create(string typeName)
    {

        if (app==null)
        {
            MvxSimpleIoCContainer.Initialize();

                app = new Core.App();
            app.Initialize();

            Mvx.RegisterType<IDataService,DesignData>();
        }

        var type = app.FindViewModelTypeByName(typeName);

        if (type == null) return null;

        var req = MvxViewModelRequest.GetDefaultRequest(type);
        if (req == null) return null;
        var locator = app.FindViewModelLocator(req);
        if (locator == null) return null;

        IMvxViewModel vm;
        if (locator.TryLoad(type, null, null, out vm))
        {
            return vm;
        }

        return null;
    }
}

The factory is where all the smarts are. The first thing we do is make sure that mvvmcross is initialized – this is similar to what happens in your app. We then call FindViewModelTypeByName (see below for implementation) to exchange the view model type name with a reference to the actual type. Next we invoke the view model locator infrastructure within mvvmcross to retrieve an actual instance to the view model we’re after, which we then return (and is subsequently set as the DataContext for the page).

public Type FindViewModelTypeByName(string typeName)
{
    return CreatableTypes().FirstOrDefault(t => t.Name == typeName);
}

Ok, but wouldn’t is just be better to create an instance of the view model, once we have a reference to the type? No, because that view model may have any number of dependencies, which is why we need to rely on the DI framework provided by mvvmcross. You’ll notice I skipped over one quite important line, which was that we register the type DesignData as the implementation of IDataService we want to use. By default the Initialize method on our App class will look for types that end in “Service” and register them, which is why our DesignData doesn’t end in “Service”, but it also means we have to manually register it.

The upshot of this is that an instance of the DesignData class will be used to service up design time data for our view models in Blend. I hope this helps anyone working with mvvmcross.

Building Apps for OneNote for Windows Phone, Windows Store and other platforms

There are newly published apis for accessing OneNote that you can get started building apps for today. http://msdn.microsoft.com/en-us/library/office/dn575420(v=office.15).aspx

WPCentral has good coverage on the new OneNote features that were recently announced:  Microsoft introduces new OneNote APIs, free desktop apps for Mac and Windows

Personally the one I find most interesting is the me@onenote.com feature where you can simply send an email and have the contents appear within OneNote (yeh I know Evernote’s had that for years). What I love is the simplicity – it detects which Microsoft account based on which email address you send it from. All you have to do is remember “me@onenote.com”. To get started:

* Go to http://www.onenote.com/apps 

* Click through to “Email to OneNote”

* Enrol your email address.

* Start sending emails to me@onenote.com

Build it Beta gets Isolated Storage Exploring in Feedback Tool

If you haven’t already started Windows Phone Application Testing with Build it Beta then I’d encourage you to check it out and start using it to deploy test builds of your Windows Phone applications and gather feedback from users.

If you’re already using Build it Beta then you hopefully realise how easy it is to push out new builds of your application by either emailing them, or simply double-clicking the XAP file and using our Windows 8 application.One thing you may not have found is that you can create feedback items directly from within the application you’re testing. After launching the application your testing, swipe down from near to the top of the screen. After a second or so (as we capture a screenshot of the current screen) you’ll see the feedback form:

image

The feedback form allows you to enter basic feedback information (bug, new feature etc) as well as attaching information about the navigation history (see navigation tab) and a screenshot (see screenshot tab). The feedback will be associated with this particular version of the application in Build it Beta.

This morning we’ve improved the feedback form to include a storage tab – this iterates through all files and folders currently in Isolated Storage and lists them. Folders are marked in bold and you can tap on a file to launch it for viewing (this is really only useful for known files types: xml, png, doc etc).

image

We’d love feedback on whether this is something that’s useful.

Windows Phone Application Testing with Build it Beta

Yesterday I announced that Build it Beta is now public for Windows Phone app developers, but what is Build it Beta? Well it’s all about Windows Phone Application Testing. There are a number of existing mechanisms available to Windows Phone application developers but none of them offer the simplicity and ease of deployment as say TestFlight. Build it Beta fills that gap, providing a mechanism to allow any Windows Phone application to be deployed for testing to any Windows Phone 8 device*.

Build it Beta 

Firstly, why the name?

Well it’s a bit of a play on words – we’re always looking to build better apps and of course during development we often release “beta” versions of the app. Hence the origin of “Build it Better Beta”.

Next, how does it work?

Windows Phone 8 included the ability to deploy applications within the enterprise without going through the Windows Phone Store. This is referred to as enterprise deployment and involves signing an application (ie the packaged application file .xap) with an signing certificate. The same certificate needs to be distributed to the devices that the application is to be tested on. Then the signed xap can be installed on the devices either via code or by distributing the application to the device via email or via a url link. Build it Beta uses this mechanism to deliver a testing tool which eliminates the complexity for both developers and testers.

Ok,  so how do I get started?

The first step is to get Build it Beta from the Windows Phone Store, but we’ve got a simple set of setup instructions that will get you up and running in no time at all. If you’re not on your Windows Phone, scan the following QR with your Windows Phone (Search button, Vision app bar button) to jump straight to the instructions.

Once you’ve completed the setup, all you need to do is to start sending your .xap files to upload @ builditbeta.com. Make sure you send them from the same email address that you registered with when setting up Build it Beta. We’ll ingest your xap and send you a confirmation email. You should also get a toast notification on your Windows Phone device letting you know that a new version of your application is available for testing. Click on the link in the email, or tap on the toast notification to download and install the signed version of your application.

* Build it Beta relies on enterprise deployment to install applications. This is a feature that was introduced with Windows Phone 8 which means Build it Beta cannot install applications to earlier versions of the Windows Phone operating system. If you need to deploy applications for testing on earlier versions of Windows Phone you can do this using the Windows Phone Store Beta process.

Bridging the Gap – One of the perils of Software Development

This morning one of my “connections” over on LinkedIn posted this image illustrating the difference between what a client wants and what they have budget to pay for:

1782026_10152653144134896_1988580111_n.jpg

This made me think of all the parts of any software development project where there is a potential “gap” that we as software developers spend our time trying to plug. Here are just a couple of the typical gaps we try to mitigate:

Requirements – We try to minimise the gap between the documented requirements for a project and what the actual requirements of the end users are. There are several approaches to solving this but in my experience having a close working relationship with the end users is definitely a step in the right direction. Get early version to them for their comment as soon and as frequently as possible.

Development – Here we’re trying to minimise the gap introduced by developers when actually implementing the requirements. Gaps introduced here can be due to lack of understanding of the requirements, issues raised that prevent the requirements being delivered as specified or just development errors.

There are a ton of other places during the software development process where gaps are introduced. In fact if you think about every conversation you have regarding a feature, there is always a risk that you’re introducing a gap as a result of miscommunication or a lack of understanding on what needs to be delivered.

Sochi Apps for Windows Phone but not Windows

The Unwired has a good summary of the two Windows Phone applications covering the Sochi winter Olympics. I had already downloaded them yesterday and must admit I was quite impressed with the attention to details. The apps are clean and responsive – of course, I reserve the right to change this opinion when the event actually starts and I want to see actual results and to be notified when events are on.

I just took a quick look on the Windows Store but alas there are no official applications there. There are a couple of third party applications but no official ones.

Building Charming Apps for Windows and Windows Phone

Fellow MVP and owner of In the Hand, Peter Foot has published a number of helper classes for developers targeting both Windows and Windows Phone. I particularly love that these enable developers to “build charming apps!”

Charming ApplicationModel
Charming Display
Charming NFC Share
Charming Popups
Charming Search
Charming Settings
Charming Share
Charming Storage

Get them directly from NuGet or visit the CodePlex site for more information.

http://charming.codeplex.com/

Aligning Characters and Spacing in Windows 8.1

When designing applications for Windows Phone we spend a lot of time aligning the left edge of virtually everything to either each other or to the imaginary grid drawn over the page. Unfortunately the SDK doesn’t make life easy for us as the TextBlock element doesn’t automatically trim white space on the left of the contents. The net effect is illustrated in the left of the following image where the “a” and “b” aren’t left aligned, despite being offset by exactly the same amount from the left edge of the page.

image

Windows 8.1 includes the OpticalMarginAlignment property which you can set to TrimSideBearings in order to remove excess whitespace. The net effect is shown in the right side of the image where the “a” and “b” are now left aligned.

Intercepting DataContext Change in Windows and Windows Phone

Often when working with UserControls you need to wire/unwire logic when the DataContext of the control changes (eg it’s used on a page and the viewmodel which is bound to the page flows into the UserControl as the DataContext). Unfortunately prior to Windows 8.1 there wasn’t an easy way to do this. In Windows 8.1 you can do the following in order to hook up to the DataContextChanged event handler

public class TestControl : UserControl
{
    public TestControl()
    {
        DataContextChanged += TestControl_DataContextChanged;
    }

    void TestControl_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
    {
        // Do stuff with the new Data Context
    }
}

So, how would you do this prior to Windows 8.1 and for Windows Phone? Well, one option, and I’m not saying this is the only option, is to create a different dependency property and connect it using data binding. For example:

public class TestControl : UserControl

   public object CustomDataContext
    {
        get { return GetValue(CustomDataContextProperty); }
        set { SetValue(CustomDataContextProperty, value); }
    }

   public static readonly DependencyProperty CustomDataContextProperty =
        DependencyProperty.Register("CustomDataContext", typeof(object), typeof(TestControl), new PropertyMetadata(null,DataContextChanged));

    private static void DataContextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
    {
        // Do stuff with the new Data Context
    }
}

And when you use this control, you’ll need to data bind to the CustomDataContext property:

<local:TestControl CustomDataContext="{Binding}"/>

The “{Binding}” without a path simply means that the current DataContext for the control will be passed in. You’re then free to do whatever you want with the real DataContext as you can be assured it would have been set at this point.

Organisations that discard TFS in favour of Git are throwing out the baby with the bath water.

A number of clients that I’ve worked with over the past couple of years have made the decision to abandon their internally hosted Team Foundation Server (TFS) in favour of a Git. Some have decided that they’re going to host their own Git repository; others use it in the cloud. Unfortunately most of them have been suckered into using Git without understanding what they do or don’t get as part of the package.

The first thing to observe is that the first couple of versions of TFS were a nightmare as they were overly complex to setup and even worse to manage. Luckily I was never game enough to go down that path as at the time I was working of an instance of SVN running on a VM with 500MG of RAM  on a Mini-PC box sitting under my desk (and btw it ran like a dream with checkins taking fractions of a second even from the other side of the planet). Unfortunately some organisations spent years fighting TFS handing it off to traditional ops people and expecting them to know how to manage it.

For a lot of developers the two step checkin process of committing locally and then pushing to a repository is just a waste of cycles and they won’t get much benefit from the peer-to-peer nature of Git. Those passionate about Git will argue that this is because they haven’t invested enough time into Git to learn how to use it to its full extent. I’d counter this by indicating that if you’re spending that long working with Git, then you’re not writing enough code and that your process is broken (most likely checking in too infrequently resulting in lots of large merges). My early arguments against Git were that it was unnecessarily complex as everything had to be done via a command line – really, really really, in this day in age, we have to use a command line to do checkins??? Luckily there are now several UI alternatives available for those who don’t want to see a command prompt.

With these points aside (this isn’t a post on why you should/shouldn’t use Git) it’s important to recognise that Git is really only about source control; source control makes up a very small, yet integrated, part of TFS. Particularly with the move to the cloud (check out http://visualstudio.com) TFS has undergone a transformation with new features rolling out hot of the press. Not only does it do source control, it also does task and iteration management, build automation, testing, and even team rooms for conversing with remote team members on a project. All of which are integrated so you can see what code was written to fix a bug, who broke the build and what they changed, and even get notification in the team room when a build has succeeded. This level of integration is completely missing from Git.

So you have to wonder, if these organisations are not using TFS, what do they use as a replacement for managing projects. The answer is a sad combination of email and disparate tools kit bootcamp and jira. The lack of integration means that requirements, tasks and bugs are often loss into the email abyss; code is modified and no-one knows who or why the changes were made and builds either don’t exist or are managed completely independently. Of course, in some cases someone in the team realises theses pieces of software aren’t working together, so they cobble together an integration piece which is so brittle that the build breaks more frequently because of their patchwork solution, than it does because someone legitimately broke the build.

The upshot of all this is that if you haven’t tried Visual Studio Online, I’d suggest now is the right time to take another look at TFS. Sign up, and I’m sure you’ll be pleasantly surprised….. oh, and did I mention you can opt to use Git for you source code!

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

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/