Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Go seems to be made for doing server side stuff for the web. What could I do if my boss suddenly dictated that he wants a Windows GUI for a Go application?

share|improve this question
add comment

4 Answers 4

up vote 1 down vote accepted

Have a look at Go OpenGL, which exposes core and extensions. There is no reason why Go couldn't be used in conjunction with GLEW (OpenGL Extension Wrangler Library) to make advanced visualisations from big data type scenarios.

Go Plot and Go SVG are out there, as I've just noticed a few hundred other bindings and library's to be found on the Go Language Resources.

share|improve this answer
add comment

Go could be used for a web GUI just as much as a regular GUI, the only difference is that go comes with builtin support for the http protocol, http multiplexing, templating, etc. There are gtk+ bindings for go, and, as Jerry Coffin said, you could use those. However, the biggest issue with using go for desktop applications is that all GUI frameworks are currently single-threaded, which does not take advantage of go's biggest strength. By contrast, HTML and AJAX based GUIs are asynchronous by design, and you could have multiple requests to the server running at the same time.

The hardest issue to work around in the scenario you proposed is the meager windows support. That is being worked on, but isn't fixed yet. At this time, you would probably want to write the GUI in python, c, or C++, and use go as a server in a client-server infrastructure model.

share|improve this answer
add comment

I don't see anything in the design of the language itself that would prevent it. From the looks of things, there's ongoing work on a set of Go bindings for GTK. I haven't tried it, so I can't comment on its current usability, but assuming it's usable at some point, it should go a long ways toward making GUI apps a realistic target.

share|improve this answer
add comment

Go is turing complete therefore you can do anything (well anything a computer is capable of doing at any rate) in it.

There is no inherent limitation in the language preventing you from doing anything in it. The only limit is the amount of work you are prepared to take on. You might for instance have to write or update a binding to the native GUI API of the operating system you are interested in if it does not already exist.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.