G
Garry Simmons
Guest
I've been writing Java and out of the C#/.NET ecosystem for over a decade, so please pardon my ignorance as I completely missed the whole XAML/WPF/UWP era. I've been trying my best to get up to speed on current technology and best practices, but it's so different than the early days of WinForms.
I inherited two old C# applications that need to be completely re-written (way beyond refactoring). One is a desktop WPF application that is basically a graphical editor for an XML file (persists the model). The other app is a Win8.1 Metro store app that runs on a Windows Surface Pro tablet that basically renders the XML file and lets the user add data to the model/XML file. Several custom User Controls are functionally common to both apps, but with duplicate and incompatible code (WPF vs WinRT).
My goals for the re-write are:
- Use MVVM to allow unit testing of as much as possible and clean up the design.
- Have the two apps share as much code as possible.
- The mobile app needs to run on Win10, iOS, and Android with as much shared code as possible
At first, I thought .NET 5 was going to be my savior with all the talk of it being "cross-platform". I thought it was going to support writing a WPF app and having it magically run on iOS and Android as-is, but I guess I misunderstood the press release/etc. I was thinking that I could re-write both apps using .NET Core 3.1 and when .NET 5 comes out, my apps would be cross-platform. It appears that is not the case...
It appears that I need to re-write the mobile app using Xamarin.Forms. The desktop app can still be WPF (or must it be UWP to share UI controls?). The shared code would be written in .NET Core 3.1/5, or does it require .NET Standard 2.x?
I'm so confused. I've been reading/googling for hours and hours and still don't understand what my path forward should be. Can anyone clear up how to create a desktop app and a mobile cross-platform app (Win10, iOS, and Android) that can share code in 2020?
Continue reading...
I inherited two old C# applications that need to be completely re-written (way beyond refactoring). One is a desktop WPF application that is basically a graphical editor for an XML file (persists the model). The other app is a Win8.1 Metro store app that runs on a Windows Surface Pro tablet that basically renders the XML file and lets the user add data to the model/XML file. Several custom User Controls are functionally common to both apps, but with duplicate and incompatible code (WPF vs WinRT).
My goals for the re-write are:
- Use MVVM to allow unit testing of as much as possible and clean up the design.
- Have the two apps share as much code as possible.
- The mobile app needs to run on Win10, iOS, and Android with as much shared code as possible
At first, I thought .NET 5 was going to be my savior with all the talk of it being "cross-platform". I thought it was going to support writing a WPF app and having it magically run on iOS and Android as-is, but I guess I misunderstood the press release/etc. I was thinking that I could re-write both apps using .NET Core 3.1 and when .NET 5 comes out, my apps would be cross-platform. It appears that is not the case...
It appears that I need to re-write the mobile app using Xamarin.Forms. The desktop app can still be WPF (or must it be UWP to share UI controls?). The shared code would be written in .NET Core 3.1/5, or does it require .NET Standard 2.x?
I'm so confused. I've been reading/googling for hours and hours and still don't understand what my path forward should be. Can anyone clear up how to create a desktop app and a mobile cross-platform app (Win10, iOS, and Android) that can share code in 2020?
Continue reading...