Category Archives: Mono

2013 Video Highlights

As we rapidly approach the end of 2013 I thought I would quickly pull together some of the best free tech videos I’ve watched and learned from during the year (note: these are not presented in any particular order). Hope you find this list useful!

You can do WHAT with C#?!

As is his way, Scott Hanselman pulled into focus for me the ability to leverage Visual Studio and C# to develop cross-platform applications thanks to Mono and Xamarin’s tooling. This video of Scott’s talk at Xamarin’s Evolve conference gave me my idea for TechEd Australia 2013.

Watch it: http://xamarin.com/evolve/2013#session-umfpnw90c9

Task<DrWho>

Speaking of TechEd, one of the best talks I went to was Joe Albahari’s excellent breakdown on how to be a better async programmer.  Aysnc development simple plain, and.

Watch it: http://channel9.msdn.com/Events/TechEd/Australia/2013/DEV422

Cloud Identities, MFAs!

One of the great pleasures of working at Kloud Solutions is that I get to work with people like Chris Padgett who is constantly pushing the boundary in one direction or another (or both at once!) Another highlight from TechEd Autsralia 2013.  See how Multi-Factor Authentication (MFA) can be added to your own custom applications.

Watch it: http://channel9.msdn.com/Events/TechEd/Australia/2013/AZR312

SANitised and no NASties

Windows Azure Storage is a key plank in both the PaaS and IaaS parts of the service offering. This fantastic video from //build/ covers some good ground and is the first public announcement of the import/export feature currently in preview.

Watch it: http://channel9.msdn.com/Events/Build/2013/3-541

Browserlink for Pirates?

No, not for pirates, but very much for developers. Utilising SignalR the new feature in Visual Studio 2013 provide two-way editing capabilities in any modern browser.  Which man? Hanselman.

Watch it: http://www.asp.net/visual-studio/overview/2013/visual-studio-2013-web-editor-features-browser-link

Hyperactive Ware

I’ve spoken with quite a few people this year for whom Hyper-V is now a real contender. While not strictly speaking a very technical video this one did make me sit up and pay attention (customer’s love it too).  Couple Hyper-V with VMM, Recovery Manager and Windows Azure and you have a strong DR foundation.

Watch it: http://youtu.be/IANszL-PuLY

So, there we have it – by no means an exhaustive list and if I do come across some bigger hits from earlier in the year I’ll update this post. If you think there’s a video missing from this list make a comment including the link!

Tagged ,

TechEd Demo Video Available Online

As previously announced I presented a session at TechEd Australia 2013 and anyone who came along will know I had some challenges with the demo component of my talk on the day. I thought it would be great to actually show you all how the demo *should* have run on the day, so to that end I’ve recorded a screencast that runs through the entire demo with a few tips and tricks along the way. I recommend you run it full screen!

You can also grab the sourcecode from this demo here: https://github.com/sjwaight/techedau2013

The video is available on YouTube here: http://youtu.be/QQO3r0myTd4 (and is embedded below).

Tagged , , , , ,

Portable Azure Mobile Services DTOs when using Xamarin and C#

As part of an upcoming talk I am giving I am spending a lot of time working on a demo that shows how to do push notifications cross-device. One concept that is really drummed in when working in this space is that building reusable C# is key to leveraging the savings from building Windows Phone, iOS, Android apps this way.

A C# Azure Mobile Services client library exists for each of the platforms and it’s really easy to use your standard C# classes as Data Transfer Objects (DTOs) for storage in Azure as a result. One item that tripped me up on Android and iOS was that I found I could write data to the cloud easily and while I could get a set of resulting objects back their properties were either null or in their default state. Not useful!

This is how my class looked – I had arrived at this after using DataMember and JsonProperty objects and finding, at first appearances, that I didn’t need either for the code to actually work. I was wrong :).

public class Task : IBusinessEntity
{
     public Task () {}

     public int ID { get; set; }
     public string Name { get; set; }
     public string Notes { get; set; }
     public bool Done { get; set; }
     public string Assignee { get; set; }
}

The challenge in decorating the above class with DataMember is that this class isn’t actually natively supported on Windows Phone – you will get a NotSupportedException the first time your application attempts to run any code that uses this class. The suggested fix in the Exception is to utilise the JsonProperty attribute instead which doesn’t actually work on Android or iOS deployment. So… this is the fix I came up with – it’s not pretty but it is leveraging one way to build portable C# code (note there is no default symbol defined for iOS builds which doesn’t help!) Behold…

public class Task : IBusinessEntity
{
    public Task () {}

    public int ID { get; set; }

#if !WINDOWS_PHONE
    [DataMember(Name = "name")]
#endif
    public string Name { get; set; }

#if !WINDOWS_PHONE
    [DataMember(Name = "notes")]
#endif
    public string Notes { get; set; }

#if !WINDOWS_PHONE
    [DataMember(Name = "done")]
#endif
    public bool Done { get; set; }

#if !WINDOWS_PHONE
    [DataMember(Name = "assignee")]
#endif
    public string Assignee { get; set; }
}

I think you’ll find that compiler pre-processor directives like this will quickly become your friend when writing C# to target multiple platforms.

Tagged , , , , , ,