Yearly Archives: 2017

You don’t need an MVVM framework to have a view factory and view model navigation in your Xamarin.Forms app

Motivation

Quite often I get asked what MVVM framework I use when creating apps, or I’m presented a list of MVVM helpers/frameworks/toolkits and am supposed to pick my preference. Let me admit that I indeed do have a preference (it is the MvvmLight toolkit) but this does not mean that my choice is the right choice for you, your project or your team. In fact, I think that there’s quite some misconception going on: many think that using a framework is a requirement to build an MVVM based app. That’s not true. Let’s see what the definition of MVVM is over at Wikipedia:

MVVM facilitates a separation of development of the graphical user interface – be it via a markup language or GUI code – from development of the business logic or back-end logic (the data model). […] MVVM is a variation of Martin Fowler’s Presentation Model design pattern.

There isn’t a single reference to a specific framework, in fact it is not even limited to a specific platform. It is all about decoupling your UI from the actual logic – that’s it. The frameworks and toolkits out there can help you reduce the amount of code you have to write. Code that would otherwise be repetitive and they also add nice features like handling view model navigation which is the topic I want to cover in this blog post.

My intention is to show you that you can focus on creating your app instead of spending too much time on finding the “right” framework. Also, you might not need most of what these frameworks give you or you don’t agree on the way things work in them, or whatever the reason may be.

Building a MAME Arcade Cabinet

Born in 1976 I still remember the great arcades from my first visit to London at the age of 17. We also had arcade machines in our small town, in almost every restaurant there was a PacMan, Double Dragon or some other machine showing off amazing graphics. I remember discussing with a friend how home computers or consoles would never ever be able to reach such awesome performance. We were young. And wrong.

Meanwhile, arcade machines have become a thing of the past and when I was in the process of building my own, my son’s friends (aged 9) asked me what I was doing there. When I answered that this was an arcade machine, they just said “Ok.” and moved on, probably thinking it was some sort of IKEA storage cabinet for my kitchen. They simply did not know what an arcade machine was!

When I was 21, I had an original arcade machine in my apartment. It was some Double Dragon like game. I bought the full size arcade for DM700 back then (about €360) and sold it two years later for about €150. At the same time, a friend bought a table video game with a version of Space Invaders and he still has it.

Every time I visit him I would get angry at myself for selling my own arcade. Well, no more!