Into Avalonia I Go

For all the praises I’ve sung to Apple’s Swift programming language, you’d think I would have thrown C# under the bus. And while I do think Swift’s package management is a lot better, I’m still quite fond of C#. That being said, my biggest problem with .NET in the past has been working with GUI frameworks. Although I’m very good at writing command line applications, it’s not where my heart is at.

My first successful desktop application was a simple game launcher designed with Windows Forms, Blue Rose. It was created for an open source project that was still in the alpha stage. When leadership changed hands, we were stuck with downloading rapid-fire builds manually. Getting tired of the madness, I reluctantly put together a quick launcher to fill in the gap because no one else would. It worked flawlessly and everyone used it. So when the lead programmer and I had a falling out (for the dumbest reason), you can imagine how I felt having to give up all that hard work.

After that, I basically bounced from framework to framework. My only requirement is that it has support for Linux. Closet I got to something I liked was Tauri, an Electron-like framework, because it had support for C# in the form of Blazor. The downside is that while it a lot more faster than Electron because it uses the operating system’s built-in renderer, it still complicated by the fact it uses Rust as the backend. (See my thoughts on Rust here) Aside from that, I basically wanted to stick Terminal interfaces.

Barkdown Editor

My biggest beef with Microsoft is their flagship UI framework, MAUI, lacks Linux support. Despite literary standing for “Multiplatform,” it only targets macOS, iOS, and Android but not desktop Linux. So, yeah, they’re not lying but since .NET as a whole supports Linux (it’s what. got me to soften up in the first place), you can imagine my disappointment. It wasn’t until I rediscovered Avalonia, a similar framework that does support Linux, that I reconsidered. So I followed their quick starter tutorial and quickly warmed to it. The tutorial was a simple temperature converter that updated in real time.

After trying it out with a few other projects and with the intended goal of porting over Blue Rose, I pondered… “Wait. This can’t just another niche one shot. I want this to full fill a need like Blue Rose but it needs to be general purpose yet still easy enough to tinker with to the end of time.” Then I remembered a long time ago when I made a website in an early version Blazor that rendered Markdown from content read from a JSON file I created. I could make a Markdown editor! I already knew this would work because I already seen the exact API I needed in action before. And it’s the most simplistic thing in the world. All you need is an input box one side and web view on the other. No wonder there dime a dozen editors out there in the wild. It’s a great progression progression from the tutorial! So I did just that.

After I quickly scraping together and remembering what I had use previously, I spun up the Barkdown project and voila! Worked exactly as I knew it would. As much I love the name, it does imply that it is a variant of Markdown when that’s not the case. It’s just a filler. xD I already read up that it’s possible to hook in support for varies filetype, etc., into Avalonia. So that makes it even better.

Leave a Reply

Your email address will not be published. Required fields are marked *