Ask HN: Xamarin for cross-platform development?

2 points by usgroup ↗ HN
Is it a trap?

So a team I'm advising is deeply invested in Xamarin. They'd ultimately like the dream of a single code-base for both Android and iPhone. However, Xamarin is organised such that the device specific libraries quickly out-strip the functionality of the device agnostic library, so a large portion of the code is now device specific.

A spot of research reveals that the popular advise is move from MVC to MVVM, and attempt to isolate the device specific code in views thereby minimising device specifics.

My question is does it actually work given realistic time pressures and business priorities, or is it a trap?

4 comments

[ 2.0 ms ] story [ 31.7 ms ] thread
It does work, especially if you have a complicated business domain. It probably takes longer than building a single app but less than building two.

As you said you build your business code as device agnostic. In our case we follow DDD, so our domain, repositories, domain services interfaces are all device antagonistic.

We then build device specific stuff on top of that with user interface and specific domain service implementations injected.

I think if you go native don't you run into writing in 2 different languages.
(comment deleted)
Well, I've been using React Native for mobile development for 3 months and everything is working well, the platform specific code can be easily written with a simple if statement or, of course, the same way as you do on Xamarin, it's up to you

Even being javascript in the end, you still can access all the native stuff with ReactBridge without any headache in the case you have some specific functionality that you might and haven't found in the lots of available packages out there :)