My adventures in Desktop GUI App development-land
Tags: dotnet, avalonia, gui, electron
Published: 2022-09-20 14:22:10

---
title: My adventures in Desktop GUI App development-land
published: true
description: 
tags: dotnet, avalonia, gui, electron
---

I am a web kind of guy.

I have been a web kind of guy since a computer technician told me it was too hard for a kid to make a website in the 1990s (yes I still remember you, piece of shit, look at me now!)

But I have also tried many other things through the years, one of them being creating Desktop Applications.

I used heavily [VB6](https://en.wikipedia.org/wiki/Visual_Basic_(classic)) in High School, and I loved it, I tried many other things through the years, [WinForm C#](https://docs.microsoft.com/en-us/dotnet/desktop/winforms/overview/?view=netdesktop-6.0) being the last one I was working with before completely losing interests for Desktop apps.

The main reason why I stopped was that I could just WebApp everything, why bother doing loads of crap, learning new languages to generate an exe file if a website would just do fine?

In the last 10 years, that approach seems to be taken by pretty much everyone, thanks to [Electron](https://www.electronjs.org/).

You write a web app, yes, but you can present it as if it was a native app, bundling a chrome browser with the exe file and showing HTML instead of native components.
The good thing about that is that you can use a set of languages you are familiar with (javascript, HTML, and CSS), and out of the box your app is multi-platform, as every stinking OS can run a Browser nowadays.

The only cons of that are:
1. Relatively Big App (~100 Mb) even for relatively small apps.
2. Quite a lot of RAM is used even for relatively small apps.

In *Modern Computers* (fucking hate that word for how much is used) RAM and size of a binary should not be a problem, but I am not a Modern Computer, I am a guy with selective OCD, and the fact that I need to write HTML and ship my desktop app with Chrome bundled it really "grind my gears".

So since I am a sucker for learning new languages, I have been recently learning Dotnet again (on Mac and Linux) and I was curious to see if there were any framework that would allow me to go full Native Desktop app dev, but keeping a low impact on a system.

I found and learned ([this is how I learn](https://vikkio.hashnode.dev/todo-list-on-how-to-learn-a-new-language)) [AvaloniaUI](https://avaloniaui.net/).

Which is nice to work with once you get used to [XAML](https://docs.microsoft.com/en-us/dotnet/desktop/wpf/xaml/?view=netdesktop-6.0) and you forget everything you know about reusable components.

I did a couple of side projects:
- A [Calculator](https://github.com/vikkio88/ACalc) using their MVVM tutorial.
- A stinking [TODO List](https://github.com/vikkio88/ToDoAvalonia) App, following another tutorial but adding a persistency layer.
- Another **f****ng** football manager game (it is in a private repo).
- A small Password Manager - [Muscurd-I](https://github.com/vikkio88/muscurd-i) (because EpicGames and Ubi Launcher kept logging me off and I needed something local to store my passwords).

The Avalonia community is quite nice also, they have a discord server, but they are mostly active on [Telegram](https://t.me/Avalonia). 

They have been really helpful and I have also been contributing to their [doc](https://github.com/AvaloniaUI/Documentation/pulls?q=is%3Apr+author%3Avikkio88+is%3Aclosed) website.

I found only one small problem.

Guess how big is the binary for the app (if you make it self-contained and bundled up with all the DLLs and external deps)?

~100 Mb ... 😞


So yeah even though it will be dear to me and I might still work on some stuff with it again, I feel like I will be learning something else now.

The next adventure is called [Vala](https://vala.dev/). It is like a C#-like language that compiles down to C but it includes [GLib](https://gitlab.gnome.org/GNOME/glib) (which is GNOME low level wrappers around C API).
It looks like it was half abandoned but then gained again some contributors.

Let's see how it goes.