
Xamarin Forms: it works - roubachof
https://www.sharpnado.com/xamarin-forms-works/
======
apedley
This post actually highlights more of XF's downfalls than positives. I've been
a big XF developer for years, and XF has many positives but this example just
shows that they needed SkiaSharp, Lottie, and native platform code just to get
their app out.

Not to mention the need for additional components such as horizontal scroll,
carousel view etc.

If you look at Flutter, most of this app could be done with just the Flutter
SDK. Haven't really played much with RN, so not sure how that compares.

~~~
pjmlp
On the other hand this app would work across desktop OSes as well, whereas
Flutter not, as it isn't their focus.

Given past experiences, I am sceptical of using languages not part of platform
SDKs for production code.

When I do use such third party languages then the eco-system plays a major
role in the decision, and for .NET vs a language clinging for survival, the
decision is obvious if I care about having the same code in production in the
next couple of years.

~~~
apedley
I understand the need for some apps to work on desktops, but I haven't
personally done any of these before. Just iOS and Android, is all clients ever
seem to ask me. So of course Flutter wouldn't work well for desktop atm. But
FYI: it is being looked at - [https://github.com/google/flutter-desktop-
embedding](https://github.com/google/flutter-desktop-embedding) Even seen an
MS employee contributing to it as well.

As for Dart, its similar to C# in a lot of ways and certainly is gaining
traction. I didn't have any difficulty writing Dart code.

~~~
pjmlp
Dart might be similar to C# in syntax, it just has like 1% of libraries
available to C#, no IDE support at the same level as C# and no commercial
value to put on the CV.

When comparing programming languages one always must look beyond grammar and
language semantics.

Flutter is trying to be Dart's Rails, it remains to be seen if it will
actually accomplish it.

How are pure Ruby projects doing in the market outside plain Rails apps?

------
ninja10
I used xamarin a few years ago for a moderately sized iOS app. It got me about
95% there. That last few percent was brutal, the app kept crashing after
coming back from the contact chooser. Couldn't find a way around it, even with
latest xamarin version, hot fixes. Was very unfortunate. I'm pretty skeptical
of frameworks that abstract away a whole system. Hopefully, xamarin is a lot
more stable and powerful these days.

~~~
petvetbr
It has improved a lot in the last year, I started working with it just as
Microsoft acquired Xamarin, it was buggy as hell, now it is really solid.

~~~
stefanfisk
People have been saying that since Xamarin came out though, myself included a
few years back.

I often get the feeling that what has happened in "the last year" is that the
developer saying it has gotten to know Xamarin well enough to avoid the warts.

------
Avalaxy
Xamarin Forms and Mature are two things I've never seen in the same sentence
before. Microsoft must have really worked its magic on Xamarin then. The last
time I tried XF it was so extremely buggy I got bald from pulling my hairs
out. Most errors are extremely vague with no way to debug them and they occur
at random times for seemingly no reason.

~~~
ParanoidShroom
I used it around 3-4 years back ago for a banking client. I had worst
experience (worse than android 2.2 ant + eclipse). However, they put a lot of
effort into it. And it could be a lot better now. Microsoft has some great
tech, you can't deny it. But how many other solutions need there to be.

------
maxxxxx
Xamarin is very tempting but all projects I have seen that tried to use it
went native after a while because of insurmountable problem. I am not sure if
I'd bet my project on it.

------
nxc18
Just today I was really contemplating how miserable life with Xamarin is.

In the morning, visual studio crashed first thing with a ‘non-fatal’ error.

Then I was making a bug fix in a Xamarin.Forms app - changing a string in the
UI. I deploy the app, but the change isn’t there. So I clean and rebuild. Then
I redeploy. Change isn’t there. I uninstall the app from the simulator. I
delete the output directory. I redeploy - still the change isn’t there.
Xamarin was deploying cached packages and I had no idea. Imagine verifying a
bug fix or change, which causes a crash, and not knowing because the updated
package never gets deployed.

Every once in a while I accidentally double-click a xaml file - big mistake. I
get to watch visual studio turn white and not respond for about 35 seconds -
time to check email and try not to break something.

In the afternoon, I wanted to connect to my mac while doing work in the
background - connecting to the Mac takes ages. Unfortunately that’s not an
option - connecting to a server is a modal operation. I have no idea why and
it frustrates the heck out of me. Even worse, they have flow problems. If you
fail to connect to a Mac, you have to close and re-open the dialog before you
can add a new one. You have to do this every single time Visual Studio
crashes. Visual Studio crashes at least 5 times a day with even moderate use.
Xamarin is a big culprit for the instability, but Visual Studio has its share
of fuckups, including mainstream releases that will just stop you from running
unit tests until they ship a patch. Or just break your build altogether.

Xamarin Forms is uniquely frustrating because it, for the last ~12 months of
my active use, always had a bug in the latest version that affects my product.
Every time I upgrade, one bug gets fixed, but another one is added. Their QA
is nonexistent and it really shows. And it’s not little things- think controls
just don’t render on some platforms, or toolbars are busted on iOS. The newest
version has some long-awaited features, but I’m afraid to upgrade. Visual
Studio is also really bad nowadays - I really, really, really avoid upgrading;
it is usually painful and more than once I’ve had to totally uninstall and
reinstall.

The build system is a nightmare. There’s a lot of complexity in Forms and a
lot of room for things to go wrong. People come to me with build errors all
the time, and the first thing I say is, did you hit the green button again?
Because failing once doesn’t mean there’s a problem with your app. There’s all
sorts of nonsense that happens with caching, msbuild instances interfere with
each other - I’ve had to painfully run builds in serial because yes, running
msbuild on two projects simultaneously will break both.

I’ve got a lot more complaints but I’m tired and want to keep it brief.

Xamarin.Forms is (and I recognize that much of the pain I described is really
problems with other supporting tools) painful enough that I wonder if it’s
worth the benefit of writing C#, and this is coming from a militant C# fanboy.

I was really hoping the Microsoft acquisition would lead to more robust QA
efforts, but clearly not.

~~~
maxxxxx
That's in line with what I have heard. Xamarin is a source of never ending
obscure problems. All projects I know have switched to native from Xamarin by
now b

~~~
ivm
Not Xamarin but Xamarin.Forms. Xamarin just works because it's basically C#
bindings to native.

~~~
maxxxxx
True. I should have been more specific about Forms. But in my company the
mobile guys have even given up on Xamarin because it caused more headaches
than solved things. First they tried Forms which didn't go well, then native
UI with Xamarin backed, didn't go well either, and now they are fully native.

------
Apocryphon
Not really my cup of tea, but always interesting to hear what cross-platform
solutions are being used outside of React Native and Flutter. Xamarin is
probably number two after RN, and gets a fraction of the buzz.

~~~
pjmlp
Buzz depends on which circles one moves on, on the enterprise shops I work
with, RN is not even relevant.

If JavaScript is involved it is either a mobile web site or Ionic.

Otherwise Xamarin is the usual option when not going native or betting on JS.

~~~
Apocryphon
It's interesting- in the Silicon Valley, hip consumer-centric startup scene,
native is king. React Native is touted in a pinch; Flutter is the new flavor
of favored cross-platform solution that is getting the hype that RN had. Yet I
wonder how many firms in the larger world aren't just writing Xamarin apps,
but apps using derided old hybrid solutions like Cordova/PhoneGap or
Appcelerator.

~~~
thrower123
The world moves too quickly for the non-startup folks to have any hope of
staying on the bleeding edge. Even if one does resolve to use the new hotness,
by the time the project is completed, the world has moved on. Not even
beginning to get into the realities of having to actually support the product
for years, on a fractional budget, where major updates and the probable event
of breaking changes in updated dependencies introduce unacceptable risk. You
really want a set of steady, stable building blocks under those constraints.

------
robax
Not sure if the OP will see this but
[http://sharpnado.com/](http://sharpnado.com/) points to a “parked” page so
you probably want a redirect.

~~~
rrdharan
I wasn’t able to reproduce this, I wonder if the author fixed it already?

~~~
steveharman
Still showing as parked for me.

~~~
therein
Showing parked here still, with Gandi.

------
catchmeifyoucan
This app looks beautiful. I agree, Forms is very solid these days. The docs
really underplay the capabilities. The library that they built in this article
looks awesome! I'm pretty surprised that horizontal scrolling is not natively
bundled. A lot of things are still in "alpha" for years, good to call out. I
want to see more new components shipped with Forms. Webview is another oldie
that hasn't gotten any updates.

------
vyrotek
I was surprised to learn about SkiaSharp. Isn't Skia what Flutter is built on?
I couldn't help imagine how great Flutter would be written in C# rather than
Dart.

~~~
apedley
I actually half built a solution where the Flutter engine was running on
Xamarin (hence coded in C#), and got a basic hello world app running. It does
have the downfall of slower boot times and larger file sizes though.

But I abandoned it because its too big of a project for a one person side
project.

------
wizche
Didn't you experience any (big) performance issue with XF on Android compared
to iOS?

~~~
rogihee
Just enable AOT by hacking the proj file and suddenly you have amazing
performance in release mode (but bigger APK). Normal builds have been getting
steadily better for Android.

------
intellisense
Well Microsoft is not using Xamarin for any of their cross platform apps. Why
should we?

~~~
maxxxxx
That's actually a weird thing with a lot of MS tech, especially .NET desktop
development. They barely used Winforms themselves, WPF got only used in Visual
Studio 2010 (and made it slow and buggy for the first releases). They put out
stuff for developers but don't use it themselves.

~~~
zerr
Yes, same goes for MFC.

~~~
maxxxxx
Very true. Does anyone know how the situation is with Apple? Do they use the
libraries they have developers work with?

------
nobody271
Okay hold on, Xamarin forms doesn't just work. That is a bold faced lie.
Xamarin, like many other languages and frameworks has its share of zealots.
Coming from a basically agnostic position on mobile development technologies I
have found Xamarin to be pretty difficult to work with.

Doing UI work in Xamarin is incredibly verbose while at the same time being
underpowered. It certainly does not just work. To give you a better idea of
the real state of Xamarin we are JUST NOW getting the ability to underline
text [https://xamarinhelp.com/hyperlink-in-xamarin-forms-
label/](https://xamarinhelp.com/hyperlink-in-xamarin-forms-label/).

But Xamarin is chock full of other gotchas. A few off the top of my head:

\- there is no real file picker (even third party) let alone a great file
picker that can pick files locally and remotely (like from google drive).

\- there are a surprisingly limited number of controls available and native or
not they often look terrible.

\- build times average one to two minutes and the debugger doesn't work about
50% of the time.

\- a lot of APIs that you think are supported are not. for example, they say
System.Drawing is supported but it's not. So what you end up doing is writing
custom implementations for each platform.

I could go on but suffice it to say developing in Xamarin is not something
that just works. It ONLY works because developers spend a great deal of time
making sure that it works.

As an aside, for my next Xamarin project I am considering doing the UI in a
WebView while using C# as the back end. It would be more like a web
application than a Xamarin application which would hopefully mean a nicer UI
while still being able to leverage C#.

~~~
gagege
> doing the UI in a WebView while using C# as the back end.

I have to ask, why not just do a mobile web app?

~~~
nobody271
Yeah, good question. I agree, lol.

In my particular case I do need some C#/Backend functionality that I don't
want to have to call a server for.

~~~
gagege
Let me guess... Some kind of legacy business logic library that nobody in
their right mind would want to port to JavaScript? I don't blame you.

~~~
nobody271
That sounds like a use case but in reality it wouldn't work anyhow because it
probably relies on Windows functionality that hasn't been ported to or doesn't
have a one to one mapping with iOS and Android.

No, It's a steganography application so I don't want to do any of it in a
browser which I imagine could be an attack vector.

~~~
gagege
Yours is a good use case.

Doing everything in JS is so common now that I didn't even think about hiding
the source code. I haven't considered it as a factor in a long time, but I do
remember it being considered somewhat of a disadvantage for Javascript around
2010.

