NyxSql Part III - WPF/MAUI/AvalonUI
In part III we take a closer look at where to upgrade our UserInterface from WindowsForms. As NyxSql was created as a learning project more than a decade ago, there is no MVVM or anything else implemented, which will make the upgrade more hard as the code is not decoupled from the UserInterface.
User interfaces overview
At first, we take a general look at the several available UserInterfaces. There are naturally more, but these are the most popular imho. Web interface is no choice, as we require a direct connection to the databases.
In my current job I am heavily working with WPF, so at least I got the knowledge to do a fast migration. We could for example change to WPF windows and host the windows forms controls inside the WindowsFormsHost, migrate the windows step by step. Up from .Net 5 there is support for WindowsForms and WPF in .Net. However the new cross platform chosen by Microsoft is based on Xamarin and called MAUI. I could not find any information, beside some dev blogs or questions on reddit/quora, which will give us an inside if WPF will be further developed or discontinued at some point. But WPF is now OpenSource and released under the MIT license, so everyone can further develop it. As many business apps nowadays are based on WPF, we can estimate that it will be supported and working at least one more decade.
This is the "new" cross-platform GUI for .Net announced back in 2020. In effect it is Xamarin merged into .Net 6. The official release was in March 2022. If you ever developed any apps for Android or iOS with Xamarin you will find yourself very comfortable in MAUI.
OpenSource, MIT licensed, .Net cross platform UI. A great start is the FAQ. In short:
- Developed by around 20 people as core team and according to the faq by 'hundreds of developers'
- Started in 2013 under the name Perspect
- Enterprise support possible It seems to be possible to host winforms/wpf controls in AvalonUI, but all links from this issue lead to 404.
Declaration of requirements
As we are porting a WindowsForms application to the new user interfaces, we have to think about the most important point of the application. NyxSql is a graphical interface for sql queries and database content. As databases normally contain many data the performant display of data in a grid is the main concern. Especially if a query will return hundreds of thousands of rows.
Furthermore, we will need to decide if it shall be cross platform or only windows. I will get some feedback on this topic and plan to continue with that series at the end of the month.