4 ms·
> how I can build a minimal app that works on all those platforms That's perfectly normal. There is no such thing as "Cross Platform .NET" The C# language an
by echopom 7y ago
> how I can build a minimal app that works on all those platforms
That's perfectly normal.
There is no such thing as "Cross Platform .NET"
The C# language and the.NET Framework does indeed run on almost all platforms, but that pretty much ends here in terms of "portability".
Anything beyond that is "platform specific"
For instance, building "desktop" applications is either UWP with advanced styling and reactive data binding but only for Windows or GTK# with Mono which is very limited.
For Mobile either Xamarins.Forms for Android + iOS but it's very limited in terms of features, or it's Xamarin.iOS + Xamarin.Android which require platform specific code for UI / Routing and many others OS specific functions.
For Web , the WASM Binary is something like 5MB+ which makes it not reasonable compared to an app written in Plain JavaScript or TypeScript.
There is still a long way to go for C# to be really "cross platform"
- GordonS 7y ago> The C# language and the.NET Framework does indeed run on almost all platforms, but that pretty much ends here in terms of "portability". IMO, that's not entirely accurate, and does .NET a bit of a dis-service. .NET Framework isn't cross-platform, and doesn't pretend to be - it's Windows only. .NET Core is cross-platform, with runtimes for Windows, Linux and MacOS. Regarding Xamarin, I guess you haven't used it for a while? Until very recently, I had the same opinion, but only because it was years since I had used it - turns out it's rather good now! Where cross-platform ends is really with desktop GUIs - web apps, web APIs, console apps, backend processing services/daemons etc, all of these work very well across the supported platforms, and the only time you'll likely write platform-specific code is the rare cases when you need to pinvoke into native DLLs. Aside from the likes of Electron, I'm not sure there really is a good cross-platform solution for desktop GUIs. Microsoft would be hailed as heros if they ever crack that one :)
- lucas_membrane 7y ago> .NET Core is cross-platform, with runtimes for Windows, Linux and MacOS Microsoft used to follow the eat-your-own-dogfood rule, which would seem to indicate that the development tools should use the same run-time and run on all the targets, but the announcement only mentions linux as a target. As a hobby-only-on-linux-only developer who does not buy or sell any software or related services, I find this announcement a poke in the nose with a clue stick.
- Narishma 7y agoJava works fine for cross-platform desktop GUIs, as does Qt and a handful of other C++ libraries.
- tracker1 7y agoQt's license is a non-starter for a LOT of commercial entities. And Java is fine, for varying definitions of "fine". I have yet to see any Java application that looks good, aside from a couple IDEs, and none that look good across platforms.
- pjmlp 7y agoUsually because the devs didn't bothered to read books like Filthy Rich Clients, or actually spend money having a designer on the team.
- merb 7y agoxamarin.forms has support for uwp/wpf (windows), linux (GTK#) and mac (https://docs.microsoft.com/de-de/xamarin/xamarin-forms/platform/other/ https://docs.microsoft.com/de-de/xamarin/xamarin-forms/platf...) it's not highlighted that much and for some stuff you need to create native views. but it works smoothly and you can do a lot of stuff. for some stuff you still need to configure native views, or call into native apis, but still it's pretty nice working and looks better and is faster than most electron stuff.