What is a good UI to use these days

I am writing simle console apps in C#. But I would like it if I had a good UI to use. Since we live in an age where everything is run off the internet or intranet through a web browser, should I use a javascript frame work? What is a good choice for that? If I am using the UI to access and upload local files, like excel data files, what would be a good suggestion to use? Is there a bare-bones javascript suggestion that I can use?

Don’t bother with JavaScript, JavaScript is for web apps. If you’re using C++, use DearImGui or Qt

There are countless options available, wherein lies the problem. GUI programming is one of the most dreaded disciplines in computer science for that reason, but let’s get an overview.

At the heart of the problem lies the fact that every OS does GUI programming differently. Both Linux and Windows even have multiple different ways of doing it. This has been a major contributing factor to the success of the “browser app” phenomenon. Browsers now have the same order of magnitude in lines of code as the operating systems on which they run. Another reason is that desktop is simply not an interesting platform economically. 90% of internet users are on mobile devices running Android or iOS.

  1. If you want to build on top of web technology, electron is the way to go. You might find it difficult to get your app to be small in size when going this route. If you are unfamiliar with web dev, it can end up testing your patience in undesirable manners.

  2. Alternatively, there are graphics-accelerated UI frameworks which sport their own look and feel. Imgui is a popular choice when coding in C. For Golang, Fyne looks like it is doing a good job of min-maxing requirements. You might feel overwhelmed by the amount of choices available when going this route, but once you are saddled you can have a really good time.

  3. Terminal GUI. If you’re not displaying graphics, video or CGI, you could make a terminal UI app. Back in the day ncurses was the name of the game. These days you should be able to find libraries for the job in basically every programming language.

  4. OpenGL with GLFW. You stay in control and can move fast, but tall orders take much lifting. You might curse at the difficulty of rendering text going this route. Requirements such as localization and accessibility can quickly break your neck. Fortunately, any OpenGL woes can these days be remedied by using RenderDoc. Still, it is a low-level route and if you are new to OpenGL it can test your patience as well.

  5. If you want cross platform native UI, wxWidgets is the way to go. It has bindings for various languages available. You might find the work you need to do to be tedious when going this route. (There’s also Qt, but I have not heard any success stories in using it from individuals, only businesses. Last time I used it, it sported C++ compiler extensions which made it a whole different beast to deal with.)

  6. Direct native GUI. Basically unheard of at this point in time. Depending on how small your app is, and how many platforms you are targeting, you could give it a shot. If you needed like 2 buttons and a checkbox, you could have a field day in Win32 GUI programming, but I wouldn’t bother to go further as you’re getting both vendor- and language-locked.

In general, you must understand that OS vendors are under no obligation to help you in achieving cross platform builds. Every platform supported, at the end of the day, is on you.

If your app is intended to take “center stage”, both (1) and (2) are great choices. Otherwise, (3) can be a neat twist. If you have a very clear vision of what the app should look like, (4) makes sense. (5) is great when your app is small and needs to launch quickly. (6) is for when you feel like making a mess.

Personally, I am avoidant of (1) mainly because I don’t think there’s anything there which could make me a better programmer. However, if all that matters is the job getting done, its success speaks for itself. If you are unsure, I’d go with (2) in your language of choice.

1 Like

Electron, while cool, is a massive resource hog. I recommend avoiding it whenever possible, as it gobbles RAM voraciously.

Seconded ImGui though, that’s just about the best option out there at this point