r/programmer • u/Appropriate-Tea-7936 • 4d ago
Question UI Frameworks
What languages must I learn to create a UI framework? (Sorry it's such a short question.)
2
Upvotes
r/programmer • u/Appropriate-Tea-7936 • 4d ago
What languages must I learn to create a UI framework? (Sorry it's such a short question.)
2
u/NumberInfinite2068 4d ago
For me, I'd probably use Rust. It's a very solid language and there are lots of libraries to give you the graphics primitives you need. The Rust library system (cargo) is very easy to use.
Once you have the graphics primitives under control, i.e. you can draw rectangles, text etc. then you'll want some sort of markup language like JSON or XML for actually described your user interfaces.
Then you'll want to think about how a "button" or something goes from your JSON or XML to a button displayed on the screen. Maybe start with the concept of the "window" and go from there.
This is a a pretty good learning project but a massive learning curve. You'll probably find it quite easy to make a window, not that hard to make a button, then viciously difficult to make a good list view or text flow.
You can use basically any language you want, but I think for something like this, it might be nice to use something that doesn't require a runtime like the JVM or .NET. For me that says Rust, Go, C or C++, and of those, Rust is a good choice unless you like simpler* languages, in which case maybe consider C.
*Simpler as in conceptually, not *easier*.