Getting Started – Part 2

Architecture Choice

Now that I have my PCL and Mobile Projects how should I proceed in building my app. After a lot of research my answer came to:

1. MVVMLight

MVVM is a great way to build apps and MVVMLight was my chosen library. It is a simple easy to use library. Other libraries such as MVVMCross, FreshMVVM, Prism, Exrin and Caliburn.Micro are also good frameworks, but require a little more setup.

2. XAML all the way.

You will find a lot of code examples where they are building the view in code behind. To me that just feels a little dirty. When XAML support came out there was no looking back. XAML with MVVM feels wonderful and clean.

Example Code: Using Xamarin Forms with MVVMLight


You will soon learn 2 things about debugging in Xamarin.

1. It doesn’t really work too well in iOS from Visual Studio, errors are hard to find and sometimes don’t even pop up at all.

2. The Android emulator that comes with the Android SDK is painfully slow. Use either Visual Studio 2015 Android Emulator or Android Player by Xamarin.

My recommendation even if you aren’t building for the Windows Platform, is to create a Windows Project and use that for all major development. You will have to of course build in the other platforms to see how things look and tweak accordingly but do most of your work in Windows Phone, get it running on there first, then build in the others. It’s debugging is fast and far more accurate.

Plus it keeps you in the familiar Windows space, which means a lower learning curve.

That is it for my quick 2 part getting started guide from my perspective. Look around the site as needed to find out more about how to do specific things such as navigation, styling and binding.