4 ms·
Thanks for those links! Some of it was great reading. What is your thesis then? What is UI?
by cloogshicer 2mo ago
Thanks for those links! Some of it was great reading.
What is your thesis then? What is UI?
- Exoristos 2mo agoDeclarative–reactive. Like SwiftUI.
- mpweiher 2mo ago"A view is a (visual) representation of its model. It would ordinarily highlight certain attributes of the model and suppress others. It is thus acting as a presentation filter." https://web.archive.org/web/20090424042645/http://heim.ifi.uio.no/~trygver/1979/mvc-2/1979-12-MVC.pdf https://web.archive.org/web/20090424042645/http://heim.ifi.u... View and model are related, but neither is procedurally dominated by the other. The view is not a subroutine of the model, or vice versa. They are related entities that communicate in order for the view to function as a representation of its model to the user, and for the model to be manipulated by the user. To get the details I really recommend the Chatty paper. It is a bit hard to read, but delivers the goods.
- jay_kyburz 2mo agoIsn't that the Controller part in MVC
- mpweiher 2mo agoCommon misconception, but nope. The quote is from the original definition by Trygve Reenskaug, the inventor of MVC (see link above). https://en.wikipedia.org/wiki/Trygve_Reenskaug https://en.wikipedia.org/wiki/Trygve_Reenskaug Here some more on that misconception: https://blog.metaobject.com/2015/04/model-widget-controller-mwc-aka-apple.html https://blog.metaobject.com/2015/04/model-widget-controller-...
- cloogshicer 2mo agoInteresting, will check that out! My working thesis is that UIs are basically video games. Just a gut feeling I can't really 100% put in words. But essentially they're the same thing: Read input, update model, render view.
- mpweiher 2mo agoThat's pretty much where immediate mode GUIs and to a less extent React came from. (Though for React the provenance is probably closer to the HTML web-app: send request - update model - return HTML with complete and completely new UI.) The difference is that for most games, throwing away the complete rendered graphics and re-rendering from the world model is often the right approach. For most UIs, it isn't, unless they really are very close to video games, for example mostly passive feed readers, video players etc.
- cloogshicer 2mo ago> For most UIs, it isn't Why? Genuinely asking, this topic is very interesting to me.
- mpweiher 2mo agoBecause the UI is supposed to be stable.
- badsectoracula 2mo ago> The difference is that for most games, throwing away the complete rendered graphics and re-rendering from the world model is often the right approach. Well, that is what "retained mode" GUIs (i.e. those using control/widget trees and such) do too. The immediate mode GUI to me always felt like an approach came up by people who do not really want to bother doing GUIs. In terms of games it is like mixing logic and presentation in a game like, e.g. int x, y; while (game_running) { draw_sprite(player, x, y); if (key_down(LEFT)) x -= 1; // etc } basically like in a game that doesn't have a world model with entities etc, just draws sprites directly, handles input directly, etc. Which is very simple for simple stuff but doesn't scale as complexity increases. Same with immediate mode GUIs and i don't think it is a coincidence that the more complex an imgui gets, the more it starts looking like a "retained mode" GUI and the gnarlier the code becomes.