3 ms·
As I write in https://www.reddit.com/r/rust/comments/9bapwt/thoughts_on_what_a_good_gui_system_would_need/e51o6mw/ https://www.reddit.com/r/rust/comments/9bapw
by mamcx 8y ago
As I write in
https://www.reddit.com/r/rust/comments/9bapwt/thoughts_on_what_a_good_gui_system_would_need/e51o6mw/ https://www.reddit.com/r/rust/comments/9bapwt/thoughts_on_wh...
I think the solution is to split in 2: A UI back-end with logic, layout, etc and a UI front-end renders in each UI native toolkit.
So when write Button(title="hello") is NOT a widget, but a struct with data. It must be pushed to UI.Coccoa.render(button) to show up. But not only that, is possible to say:
Form
when(toolkit=UIKit) Field(UILabel="UserName", UiTextBox(PlaceHolder="Write your user")
Field(Label="UserName", Edit(PlaceHolder="Write your user")
to specialize per specific platform.
- pier25 8y agoSo controllers and views?
- mamcx 8y agoYes, the "novel" idea is the split in the actual binaries/languages: Do the core on rust/c and the render on swift/kotlin/.net...
- yellowapple 8y agoSounds like what Scenic's trying to do for Erlang/Elixir GUI programming, albeit at a lower level. Also sounds like what wxWidgets already does.
- ec109685 8y agoThat’s what ReactNative does
- mamcx 8y agoNo. Almost. You must buy the whole Package with react and others. You don't code normal UI on Swift and still be part of the react world. Think is like build a JSON API. My idea is that. This mean that on the client, is full native (with some minimal coupling to the how transfer data).