Live data from Hacker News

Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

news.ycombinator.com

21–30 of 89 posts

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#21

You might want to consider how much Microsoft uses it in their own products before choosing to use it. This article describes the situation pretty well: "not even Microsoft, literally the people who own Xamarin, use it in any of their big products like Teams, Outlook, and the list goes on. Instead, they reach for native development or Electron. So we can just tie a bow in it and have a minute's silence for another en…

In the case of Teams, I think they regret choosing Electron. A Xamarin app doesn't need to use XML or Xamarin Forms which provides UI components. A totally custom interface/game can be developed with Xamarin + SkiaSharp which provides drawing primitives.

They could also just use flutter which is skia under the hood - I think would be substantially faster than dealing with Xamarin.

Doing stuff with Skia on MAUI at least is tricky because there is no concept of a mouse, so good luck creating a hover effect on your button.

https://github.com/dotnet/maui/issues/3739

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#22
post #16

Earlier quoted context omitted.

In the case of Teams, I think they regret choosing Electron. A Xamarin app doesn't need to use XML or Xamarin Forms which provides UI components. A totally custom interface/game can be developed with Xamarin + SkiaSharp which provides drawing primitives.

As a user with a finite amount of memory on my computer, I also regret them choosing Electron.

They should hire better engineers, perhaps those with more experience than just leet code. The apps i built using electron for some clients have none of the issues teams has. I mean come on, teams is a basic chat app, how difficult is it to optimise it?

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#23

As a .NET developer that's focused mostly on web development (e.g. APIs + SPAs), I've not been very eager to wade into the pool of XAML that is .NET desktop/mobile frameworks. But I'm becoming more optimistic with the introduction of Blazor Hybrid. Whether you're using MAUI for mobile & desktop, or WPF/WinForms for just desktop, Blazor Hybrid provides you a web view that enables usage of Razor components made of C#,…

How is the performance? I was tempted to do some blazor work after trying some blazor demos on my M1 Mac. Then I tried it on my not-that-old Xeon windows desktop and it was unusably slow. It can run Google Earth and Visual Studio (and a whole bunch of electron apps) just fine, so my assumption was that Blazor is actually just bad.

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#24
I don't trust the "new nice microsoft this time it's true we love FOSS and users I swear" enough to tie my stack to any of their products.

Things like VSCode, github or azur pipelines are ok because the cost of a potential migration away from them is tiny compared to the benefits they bring.

However, basing your entire code base (e.g: with .Net), dev env (e.g: codespaces) or infra (e.g: azur cloud) on their tech is betting that a company with a terrible track record will never, ever, go back to its previous bad practices.

I'm not making that bet.

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#25

At a previous agency job, I was on a project that was re-writing an iOS and Android app used by millions of people. We looked hard into using Xamarin for this but in the end concluded that it was not ready yet. This was in 2019. Main reasons were: - You can use Xamarin.Forms to write cross-platform UI, but our UI was complicated enough (a weather app with lots of custom UI) that Xamarin.Forms would not have worked fo…

Did you consider writing the bindings yourself? In my experience when I've needed a few dozen APIs, it wasn't too bad. It certainly seemed like less work than two native apps. But perhaps that wasn't the case for you?

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#27

As mentioned Xamarin is now MAUI[0] The only app I know of using it is Bitwarden[1] [0] https://docs.microsoft.com/en-us/dotnet/maui/what-is-maui [1] https://github.com/bitwarden/mobile

I've deployed an MAUI-app to production. I chose MAUI since the rest of the stack is dotnet and we have ready built SDKs in dotnet to communicate with the backend, so I had a functioning login page up and running in minutes.

It was a very frustrating experience in the early days, but as MAUI has matured it's now a pleasure to work with. It is not as feature rich as some other frameworks, but it fulfilled our needs.

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#28
post #17
post #4

We are on top of .NET 6 today. Been using a .NET stack for over half a decade in production. We still just do the web app thing. For our business & customers, this is the lowest-friction way to deliver the application experience. So, we are effectively cross platform on both our client and server. We only have to maintain one code pile to make it all happen. If you can figure out a way to make the web work for you, t…

You can still build a simple webview wrapper and put it to the App Store.

Not really. See 4.2. https://developer.apple.com/app-store/review/guidelines/#min...

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#29

You might want to consider how much Microsoft uses it in their own products before choosing to use it. This article describes the situation pretty well: "not even Microsoft, literally the people who own Xamarin, use it in any of their big products like Teams, Outlook, and the list goes on. Instead, they reach for native development or Electron. So we can just tie a bow in it and have a minute's silence for another en…

Those products predate the purchase of Xamarin and are web products in their latest form. It's not that surprising or telling.

Re: Ask HN: Are you using .NET to write cross-platform desktop or mobile apps?

#30
I'm maintaining a cross-platform headless application at the moment. The frontend is in Java maintained by a different team. Dotnet core works pretty well for Windows/OSX/Linux.

The UI story is .. less encouraging. I'm not sure a UI that's both cross-platform and native-compatible is even possible. Microsoft have a load of offerings none of which anyone is really happy with.

I think the main way of building a cross-platform app in C# is not Xamarin but Unity...

Post reply on HN