Tuesday, 23 April 2013

A C# dinosaur in a mobile world

As a C# developer of many years I've come to think of myself of a bit of a dinosaur in this brave new mobile world.

With the love from Microsoft around c# waning away with the demise of WPF and Silverlight and new kids on the block like HTML5/JavaScript being welcomed to the Windows8 party, C# developers start to question their future.

I've spent many long evening trying work out how the hell this WPF data binding, command routing, converters and view models are supposed to work, I'm no way an expert on WPF but I've come through the other end with a decent understanding of how things hang together.

In other moments I've tried to build an iPhone app with objective c - it was a painful experience - I paid my $99 dollars to be an Apple developer, bought several books, read many blogs and even signed up for the on-line Stanford iPhone course.

Xcode is no Visual Studio and Interface Builder is not my UI builder of choice - I still don’t understand outlets.

I'm not interested if c# or objective c is better, I'm interested in what’s best for me and it isn't objective c.

I did manage to build a fairly complex app and got it running on my phone and felt fairly pleased with myself until a non-technical friend said to me ‘Can you put on my Android phone?’

<Sigh> - No way was I going through that again in Java!

Still determined to crack this mobile development I turned to HTML5/JavaScript – after all this means I could build for both iOS and Android.

Now I quite like JavaScript especially JQuery and the assorted libraries - so I went into this in a positive frame of mind that this was the way to go.

It was easy to knock together a HTML app that ran in the browser, but it sort of felt easy to do it wrong - it reminded me of my early visual basic days when it was easy to put together (badly) a windows app.

You can’t argue that developing mobile apps in HTML and JavaScript is definitely an option and for many people the right option.

I used PhoneGap (other frameworks are available) that allowed HTML apps to run locally on the phone.

Somehow the app still felt like it was a HTML app and not a native app – like I say I was probably doing things wrong but I wasn't happy with what I had produced. Building a HTML app for mobile felt like I was doing it this way because it was the easiest not the best.

I saw one quote that said building mobile apps in HTML was guaranteed to be cr*p on all platforms – I think that is unfair but I understand the sentiments.

I still yearned to use C# to do mobile development, I wanted to take the familiarity of using my tools of choice, things like Visual Studio 2012, ReSharper, TFS, my own plugs in, code generators, templates, code snippets and network of people and websites built upon over the years.

What would be even better is if I could take all those painful long nights learning data binding etc. with WPF into my mobile development world.....

Enter stage right Xamarin and MvvmCross

No comments:

Post a Comment