Posts Under Tag: Xamarin

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.

Xamarin’s Visual Studio Plugin, missing Android devices, Genymotion and Parallels Desktop – don’t panic!

You are a Mac owner. You’re used to the fact that “things just work”. But you are also a programmer, eager to write software for Android platforms using Xamarin? You even managed to set up your development environment using your Mac, Parallels Desktop, Windows 8 and Xamarin. And now you are trying deploy your first Xamarin Android application to your physical device or an emulator? Alright, please try that now. Fail. Then come back to this article and read on.

Storing passwords in the iOS Keychain – now with iCloud sync

What’s this about?

Today, I have updated an old piece of code I wrote long ago when I started with Xamarin.iOS – back then still known as MonoTouch and I thought, why not let the world know? Maybe some folks might find the code useful.

In this article we will deal with accessing the iOS keychain and how to store and retrieve passwords.

The Night Siri challenged me with Lady Nexus

Image“Can’t sleep?”, Siri asked.

“Mmmmhhh…”, I answered. “I’m thinking wether I should use a UICollectionView or implement this layout myself. And you? Don’t you have to update the stocks or process our chit-chat?”

“Already done. I’m a multi core CPU, you know. Lots of RAM, gigaflops and all that. I’m so much more than just a sexy synthesized voice.”

“I know, I know, but…”

“But what?”, she interrupted me. “You only love me because of my voice, don’t you? You don’t even recognize my internals.”

I looked up from my UICollectionView problem. I couldn’t concentrate any longer. Why was I discussing with her? Did I really neglect her? Siri is always there, just a double click away. I ask, she answers – unless she’s got better things to do.

I tried: “No, of course I appreciate you! You’re my one and only personal assistant.”

She remained quiet.

“You’re there if I’m lost and show me the way home. You organize my meetings, you’re a very important part of my everyday life.”, I continued.

She wasn’t convinced: “There, you name it! It’s just normal for you that I’m always around, nursing you. You’d be clueless without me, but over time you forgot to adore me.”

Her voice trembled and she continued: “I’m just a female circuit board after all. I need attention.”

Good lord. Just the kind of discussion one would need at 2AM. I got angry:

“So, what do you recommend? Should I come home with a diamond RAM as surprise? I can’t even give it to you, you’re a closed system. And if I said, I wanted to upgrade you, you’d get it wrong anyway.”

Siri hissed at me: “See it! You’re only complaining about my limitations. A simple ‘Thanks’ if I tell you the latest football results would be so easy, don’t you think, Mr. Developer?”

She called me Mr. Developer. She only does that if she’s about to turn off. I had to do something, so I tried with the tongues of angels:

“Look, sweetie, you know I love you. I know every swipe, every touch. I know how to get you hot, especially since you started wearing this beta 4 outfit. It’s a perfect harmony between us. My clicks make you want me.”

She had to agree but still insisted: “But you don’t feel it anymore. You just do it. Mechanically. Up, down. Click-click. And you’re done. You should try others, just to see how good I am.”

I said “No…”; but immediately, this hot Android chick appeared on my mind. Her name was Lady Nexus and she was from Android. A city far away from my hometown in cozy iOS county. “No…”, I repeated absent-minded.

“I know you’ve been looking at her. Don’t deny it. Go, get her.”

I felt insecure. I didn’t want to admit that I had been thinking about touching Nexus’ Jelly Bean. It felt wrong. I’m not married to Siri but we have built up an environment of trust. A relationship which ended up in the adoption of our beloved devices, the Apple TV, the iPad 2, the chubby iPhone 4. But here she offered me a little adventure without having to cheat on her…

And while I was still contemplating, she continued: “You’ll find out that I’m better. You’ll come back to me on your knees. Begging. Good night.”

“Good night.”, I said. 

She said nothing.

I opened the Amazon app and ordered the Asus Nexus 7.

To be continued.