flofriday / thumbcloud

Thumbcloud is a file-sharing server to replace your USB thumbdrive.
MIT License
103 stars 9 forks source link

GTK3 Client #1

Open mmstick opened 6 years ago

mmstick commented 6 years ago

When you get to a point where it's possible, I can write a GTK3 client in Rust for interfacing with the service.

flofriday commented 6 years ago

Sorry for my late reply, I was the last week on holiday. However, I thought a lot about your offer. Here are my main thoughts:

Current State

At the moment the code is mostly undocumented, and there are some not so clean code parts. These are two issues I want to work on in the upcoming 0.0.4 release. Overall the next release will make it much more contribution friendly.

Architecture

How must the architecture look like so you can write an GTK3 client for it? Do you maybe have an example where you have written a GUI for a service ?

GTK3 ?

This one might sound harsh, but I am just asking. Is GTK3 the right technology? As far as I know GKT3 only runs on Linux Unix. So I would also have to write a macOS and Windows client, or is there a easy way to run it on all 3 platforms? I know that writing 3 clients would probably resolute in the best UX, but I just don't have access to Mac and so I couldn't develop a frontend for macOS. I am just curious if a cross platform GUI library/framework would be a better approach, maybe something like Rust Webview

Please correct me if I got anything wrong.

PS: I admire your projects, and really hope that this will work out.

mmstick commented 6 years ago

The API that you're using for the web client should work fine for the GTK client, too. The architecture shouldn't matter. I can make a native UI from whatever inputs I get. And whatever logic is not required by the GTK3 client, I can move to a generic front end library. API interactions are generic and will be placed there, using reqwest. Widget construction & programming will entirely be in the GTK workspace member.

GTK3 is cross-platform, and thus supports all platforms; but I will say that, as a System76 employee that only writes software for Linux, I only care about Linux support. When Redox OS has OrbTK in a good state, I can write an OrbTK version based off the GTK3 UI. With any luck, the OrbTK front end could one day deprecate the GTK3 front end. The API is soon to be based on the DCES API, which is based on the ECS model.

I don't consider a web-based UI as an option. It wouldn't integrate with the rest of the desktop. I'd like to see a coherent experience that fits with our desktop. Perhaps also making a UI for configuring, starting, and enabling a systemd service for the server so that it's a bit more approachable for the average desktop user to use it.

Do you maybe have an example where you have written a GUI for a service ?

I've written quite a few GTK3 projects in Rust, three of which have interacted with web services.

Popsicle is my best open source work at the moment, due to the amount of work put into the parallel single-reader, multi-writer; asynchronous loading of the UI; parallel progress bars; and enabling Wayland support, despite needing admin privileges to flash drives.

I've also worked on the elementary Installer for Pop!_OS 18.04, primarily on the custom partitioning view, which has quite a few custom widgets, but that's written in Vala.