Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is Avalonia to develop crossplatform application?

I am a WPF developer. Our team is looking for a good cross-platform solution to replace the old desktop product developed with WPF. We recently found that Avalonia might be one of the great ways, but it seems like there are not many demo cases or deep insights. Only one good is https://www.reddit.com/r/csharp/comments/dgfxbl/my_experience_developing_crossplatform_app/

Please share your experience and thanks a lot.

We would like to know:

  1. Cross-platform performance.
  2. Application Stability developed by Avalonia
  3. PRO and CON to other cross-platform solutions like JAVA, QT, WEB, etc.
like image 683
CHRISQQ Avatar asked Dec 08 '22 11:12

CHRISQQ


1 Answers

  1. Works faster than WPF on several workloads thanks to using Skia for rendering, works slower on other workloads due to some parts of the framework still being not optimized. In terms of platform coverage it works out of the box on basically any x86 Linux distro (non-glibc based and ARM will require a custom SkiaSharp build), Windows 7+ and OSX 10.13+. You'll get your cross-platform GUI, even global menus are now supported. Tray menus are expected in the next release or the one after that. What's currently missing is proper eastern locale support, there is no ETA for that, probably 2020 Q4.
  2. 0.8.x and 0.9.x versions were heavily tested in the wild on a variety of systems (even exotic Linux distos like Qubes OS) thanks to the help from Wasabi Wallet project (which is one of the success stories of using Avalonia, BTW).

3.1. PRO:

  • it's C# and full XAML (i. e. no control wrapping, you have full control over the templates), so you have a great programming language with automatic memory management and compile-time type checking with a solid customizable UI markup with MVVM support.
  • if you are porting from WPF and using 'manual' MVVM, ReactiveUI, Prism or MEF, you can reuse your entire view model layer.
  • you have full access to platform APIs via P/Invoke (you won't get those easily in Electron-based app)

3.2. CON:

  • No mobile platform support till somewhere in 2021
  • There aren't that many ready-to-use rapid-prototyping components like in web-based frameworks
  • There will be breaking changes. Same goes for pretty much every web-based technology, though. Try updating the dependencies of a complex React app that nobody has touched for a year.
like image 109
kekekeks Avatar answered Dec 26 '22 10:12

kekekeks