Wednesday, November 23, 2022

MAUI App Accelerator v1.1 - Now with C# Markup support

Version 1.1 of MAUI App Accelerator is now available from the Visual Studio Marketplace.

The big change in this version is the inclusion of C# Markup as a 'Coding Style'.

Partial wizard screenshot showing all three Coding Style options

This adds a way of creating the UI entirely in C# and with no XAML.
Ok, that should probably come with a small asterisk, as the generated apps still include XAML files which define the default control styles. I'm not sure if this is the best way to go. Looking at various public projects, it seems there is mixed opinion on doing this. If you have thoughts on what MAA should do, I have an issue open on GitHub where I'd love your feedback

Exploring the creation of UI without using XAML has been an enlightening experience. It's caused me to think in new ways about creating the UI. It's also tied in with some of the thinking I've been doing recently about how to improve the way XAML is written.

The overarching thing I've seen when exploring creating UIs this way is that it's a technique that's still in its infancy. There's a lack of established patterns and "best practices." Lots of what I thought of as basic, core functionality is missing. There's a lack of consistency and conventions is how people create UIs this way. Also, lots of what I've seen seems to be based on ways of recreating in C# what would otherwise have been done in XAML. This seems to be missing out on some of the potential benefits of not using XAML. When writing C# to create a UI, I find I want to do things very differently from how I would in XAML, but I don't yet know if that would have any currently unforeseen consequences or be too hard for others to understand.
The UI code generated by MAA is still very simple. It's this way, so it's easy to remove (for those needing something different in their app) and understand for those who are learning--or want to know what can/can't/should/shouldn't be removed. 
I strongly suspect that people creating UIs with C# in a couple of years will be doing it differently from how I see it being done today.

I'll continue to watch the MAUI.Markup and CSharpForMarkup repositories, and hope to learn from them as more people start creating UIs this way.


Post a Comment

I get a lot of comment spam :( - moderation may take a while.