DEV Community

Vincenzo
Vincenzo

Posted on

My adventures in Desktop GUI App development-land

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 in High School, and I loved it, I tried many other things through the years, WinForm C# 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.

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) AvaloniaUI.

Which is nice to work with once you get used to XAML and you forget everything you know about reusable components.

I did a couple of side projects:

  • A Calculator using their MVVM tutorial.
  • A stinking TODO List App, following another tutorial but adding a persistency layer.
  • Another fng football manager game (it is in a private repo).
  • A small Password Manager - 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.

They have been really helpful and I have also been contributing to their doc 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. It is like a C#-like language that compiles down to C but it includes 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.

Top comments (8)

Collapse
 
ninhnd profile image
Dang Ninh

Have you looked into Tauri? I'm not a Desktop apps programmer by myself, but I heard that it fixes the shortcoming of Electron

Collapse
 
vikkio88 profile image
Vincenzo

oh I did not. Will look into that a bit more it looks promising

Collapse
 
krtirtho profile image
Kingkor Roy Tirtho

You got Flutter for all platforms

Collapse
 
vikkio88 profile image
Vincenzo

oh yeah that's what I decided to look into next, seems quite hacky. like a nicer react native

Collapse
 
andydotxyz profile image
Andy Williams

You should consider trying Go and the Fyne toolkit. Much smaller apps, no dependencies and fast rendering too.

Collapse
 
vikkio88 profile image
Vincenzo

Good shout, I had tried fyne in 2020ish, will try it out a bit more thanks

Collapse
 
andydotxyz profile image
Andy Williams

Be sure to join our Slack or Discord communities if you have questions. Just like the Go community the group is super helpful.

Thread Thread
 
vikkio88 profile image
Vincenzo

tried and made a new post about it, if you are interested in some feebacks