idanarye / woab

Widgets on Actors Bridge - a GUI microframework for combining GTK with Actix
https://crates.io/crates/woab
MIT License
14 stars 1 forks source link

Can I use it, should I try it? #1

Closed piegamesde closed 3 years ago

piegamesde commented 3 years ago

Hi, what's the state of this project? Is it more like some idea or research prototype, or is this something that I can actually take and build my application upon? Has this already been used somewhere except for the examples?

idanarye commented 3 years ago

It is read for usage - it's just not battle tested. I'm using it in two projects (https://github.com/idanarye/kosem and https://github.com/idanarye/chapter-tracker/tree/rs-sqlx) but these projects are so undercooked I couldn't really list them as usage examples.

That being said - as far as GUI frameworks go (and if you squint hard enough you can call WoAB a GUI framework) WoAB's scope is extremely limited. The GUI is GTK. Not based on GTK (like Relm) - it is GTK. I'm not creating my own widgets and signals - all I do is:

So, with the scope being so small, even thought the codebase and feature list are small I consider them production ready and see nothing obvious to add to them. Of course, if you do decide to try it for your project you may encounter features that WoAB should - and if it's within the scope of WoAB I'm always open to bug tickets and pull requests.

piegamesde commented 3 years ago

Great, thank you. I already gave it a try, expect me to come back with issues and feature request :)

WoAB's scope is extremely limited

That's what I like so much about it. I can pretty much reuse all my existing code and the migration path is pretty good. All parts are optional: at the moment, I copied the code that registers event handlers into the started method and it works. I can go ahead and use the signals bridging later on. I also like that I can just choose which parts to use and which not. (For example I didn't understand the Factories macro and it doesn't seem to do what I needed so I simply went without.)

idanarye commented 3 years ago

Since I'm using Glade and builders, WoAB is pretty much geared toward using Factories. Is there anything I should add to help your builder-less usecase?

piegamesde commented 3 years ago

At the moment no, I don't even know what I want/need ^^. I'll create new issues once I'm ready. I'm just messing around a bit, figuring out patterns that work well. For example I currently use woab::BuilderUtilizer::from(builder.clone()).actor(…) to instantiate all my actors manually from the same Builder. This works rather well with the exception that only the first one will get all the signals.

idanarye commented 3 years ago

That's because the factories are running the builder from the XML every time to create multiple builders, each with their own signals.

What are you finding hard to understand with the factories? Maybe my documentation is lacking and all it takes is to fix that...

piegamesde commented 3 years ago

I've factored out my problem into #3. Regarding the documentation, I think my problem is not with the concept of the factories struct, but rather the Factories derive macro. Why does it take one XML file and how does it dispatch that XML to the BuilderUtilizers? I've had a glance at the code and it seems to do some parsing?