Ideas for a future innovative UI framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nicolas Lenz 2f25bc2663 Update 'README.md' 1 month ago
1 month ago

# FractalUI

• Declarative
• Metametameta
• Multiple targets with themes

### Targets

Targets that should be possible do realize using the language

• ncurses terminal interface
• Qt/GTK/Windows/Mac desktop interfaces with native look and widgets (e.g. global menus on Mac)
• Android
• iOS
• Web
• Smartwatches even?
• Smart TVs using remote for control

Point being: The UI descriptions should be general enough to target a wide range of devices at once.

### UI Description

The actual interface is described on a meta level using general terms like pagegroup, page, group button form, which can be translated to fitting widgets and elements depending on the target and the theme.

E.g.: A text field is displayed on Android as a text field with the prompt inside and on desktops as a text field with label.

It should also be possible to generate forms and the likes from data types.

Things to figure out:

• Base language to use
• YAML? Easy to write and read, well known and supported, but might not be a good idea considering the problems with YAML
• JSON? Far too ugly to write. Out of the picture.
• XML? FAR too ugly to write. Out of the picture.
• Dhall might actually be a great fit for this. It’s pretty much JSON, but the syntax is less exhausting and the programming and typing features could be quite useful this usecase of defining a UI
• I’m still not quite enthusiastic about the syntax. It’s to haskelly and might not fit well if this is supposed to be part of the future Katrin ecosystem
• The language might be too complicated, pushing up the entry barrier
• TOML? Good for configurations, but bad for nested stuff like you’d need for a UI
• AXON? Looks interesting, but might be to convoluted and niche
• Protocol Buffers? Need to look into that, but not made for human use
• oof there’s a lot of data serialization language that all suck one way or another
• Something self-cooked? KaVN?

### Scope

The goal is to have a tool to create UIs for a wide range of devices with minimal effort in a declarative way. Themes make it possible to choose the look and feel of the results. Custom themes allow to fine tune the results.

But if you want to create UIs with advanced features and fine-tune the results for the devices it is used on, you’re probably better off using the native toolkits available or some of the other, more powerful, but also more complicated, cross-platform technologies.

Also, if you want a customized and uniform look, you’re probably better off using some HTML- and CSS-based technology.

In short, the objective is to create some kind of Pandoc for GUIs. You can use a simple language to generate all sorts of outputs, even in complicated platforms, all looking great and containing the content you specified, but if you need fine-tuning and advanced features you might be better off using the target platform directly.