lxn / walk

A Windows GUI toolkit for the Go Programming Language
Other
6.83k stars 885 forks source link

Reorganize the package to enable potential cross-platform support #176

Open typeless opened 8 years ago

typeless commented 8 years ago

I like the design and usefulness of the library. and I think it can be slightly reorganized to enable its potentials.

The idea is to make the 'declarative' sub-package the outermost package, while moving the original outermost source files for lower level APIs into a sub-package.

The resulted directory layout would looks like

.
+-- walk/
    +-- data/
    +-- examples/
    +-- l10n/
    +-- tools/
        +-- ui2walk/
    +-- kernel/
        +-- Windows/
        +-- MacOSX/ (maybe)
        +-- XWindow/ (maybe)
        +-- iOS/ (maybe)
lxn commented 8 years ago

Thanks for the kind words.

I'm not sure how walk should move forward. There are a lot of interesting things happening recently and I am losing interest in Go.

For cross platform GUI stuff with Go, I would just wait for https://github.com/andlabs/ui.

vprimachenko commented 8 years ago

if only libui had the same beautiful declarative interface

typeless commented 8 years ago

@lxn I am interested in your comments about those interesting things if you have a blog post or whatever. :)

In fact the company I work for decided to go with Swift and I do think it's a fun language to play with (especially the REPL). But Go does have some points that I am always missing even though I can barely use it in my day job.

lxn commented 8 years ago

@vprimachenko: There will probably be something similar: https://github.com/andlabs/ui/issues/102

lxn commented 8 years ago

@typeless: Rust seems to be great to build libraries which can be used from other languages. For application development though, lifetimes get too much in my way to be really productive.

For cross platform GUI, libui looks really promising and compared to most of the competition, it should be easy to wrap it for your language of choice.

Can't talk much about Swift and Pony, as I have only read some of the tutorials and played a bit in web based sand boxes.

Anyway, for GUI stuff, I would imagine Swift to be an excellent choice, once there is a Windows port. I work for a Windows shop, where desktop GUI apps make up > 90% of the code, with only some little web service thingies running on Linux, so I hope it won't take too long for a Windows port of Swift to emerge.

For highly concurrent code, Pony may become a nice and more powerful alternative to Go.

jtwatson commented 8 years ago

@typeless: I really like this idea. IMHO the beauty of walk is that it is pure go and thus can be easily cross compiled. I think it would be assume if we could support multiple platforms with such simple build story. Right now I do all my development on a MacBook, create a full featured console app that is built with a simple "go build". Once the App is done, it is easy to write a walk gui using build tags and then build it with "env GOOS=windows GOARCH=386 go build", and the resulting exe runs on windows. Done! I don't have to worry about installers for each platform. All I need is to provide the executable.

If it were possible to to extend walk to linux and OSX as you suggest above, I think this would be a much better build/deployment story then the libui approach. At least from the perspective of someone using the solution vs developing it :)

kolkov commented 8 years ago

+++ good idea! ))

mewalig commented 8 years ago

+++++. My thoughts exactly