Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI abstraction layer category, such as for goey and govcl #14

Open
arran4 opened this issue May 10, 2023 · 5 comments
Open

UI abstraction layer category, such as for goey and govcl #14

arran4 opened this issue May 10, 2023 · 5 comments

Comments

@arran4
Copy link
Contributor

arran4 commented May 10, 2023

I would argue that some of the UI toolkits, especially the ones which are cross platform, belong in their own category of abstraction layers. lcl/vcls seem to be switchable to gtk, native, qt, and other, that's very much an abstraction. While goey seems to be more like wxwidgets where it picks on UI library for each platform.

@zigo101
Copy link
Contributor

zigo101 commented May 14, 2023

Honestly, I have not enough time to experiment all the libs in the list, so I only have rough understanding of most of the libs. The current category principle is simple, by how the widgets are rendered:

  • call APIs of other UI libs (native GUI and utility bindings)
  • use browser engines (HTML based GUI)
  • call 2d or 3d vector painting APIs (custom GUI)

Do you mean the first category should be divided into two?

@arran4
Copy link
Contributor Author

arran4 commented May 15, 2023

Once again thanks for creating this repo and maintaining it.

Trying to help here, let me know how this goes.

I think the first category is missing a distinction between libraries that provide a library directly, ie GTK is just a direct CGO, and libraries which provide something more.. Like Goey provides an abstraction layer of it's own UI, and the abstraction layer category can mean it's supporting multiple different native (and custom) UIs.. Such as the LCL one is a PascalGo (is that a thing, probably via cgo?) layer to the lazarus system, which is an abstraction layer, to native AND custom, and provides their own custom widgets in addition to that, if that makes sense?

Sorry including more information that is necessary.

GTK is technically a custom UI but *nix doesn't really have anything considered to be "native" for consistency of experience is does the same in each platform, it probably does use some native but I don't know. It's all happening outside of the GO ecosystem so perhaps that's where you're drawing the line:

image

Goey directly links to the library for each platform. However it doesn't provide direct access to it, instead you do things in the Goey way. Which means the underline library could change at any point in time. Which is what I mean by an abstraction.

image

wxWidgets is a C library example of this, they have a bit about it here: https://docs.wxwidgets.org/latest/page_port.html

Something like Govcl / golcl are an extreme version, because they can target native OR another cross platform library OR their own:

simplescreenrecorder-2023-05-15_10.52.15.mp4

So I guess it will look something like this: (Probably many errors and omissions)

image

Any my argument is that multi ui system "abstractions" is missing. However you might be looking at this and go "I got custom wrong -- technically they all are!" I don't think you have. But I think it's best to classify "custom ui" as "Drawn by go on all platforms." Which ties into my placement of Ebiten UI.

(Feel free to reuse these diagrams in anyway you want)

@arran4
Copy link
Contributor Author

arran4 commented May 15, 2023

https://excalidraw.com/#json=ieQMe71haC3fF6Kd2Ca55,Pq42zbBnqmgexNckJDwBRg Editable version of the images above.

@zigo101
Copy link
Contributor

zigo101 commented May 16, 2023

@arran4
I learned a lot from your comments.
And I agree the current category way is indeed not very scientific.
Another alternative way is to merge the current 3 categories in to one and tag each project.
Let's me think for some time.

@arran4
Copy link
Contributor Author

arran4 commented May 16, 2023

Sure. No worries. Let me know if I can help with any more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants