Hey, I’m the creator of go-app. What a surprise to come across this post on HN! I’m really happy to see you folks built something that fits your needs with it. Wishing you continued success with your product!
templ Hello(name string) {
<div>Hello, { name }</div>
}
For me personally, the latter seems nicer
- I can see at a glance the structure of the HTML
- Completion on the HTML tags, attributes, etc
- Completion on CSS (TailwindCSS LSP for VSCode)
- Logic can still be shared with other types of UIs (e.g. CLI, Native Apps, Webkit, gRPC)
If what you want is option 1, isn't this solution incomplete. That is, the fully realised vision would be a native component / widgets API (e.g. Fyne, QT, GTK), and then generate HTML from the components?
However, "since Dagger Cloud is built as a PWA, it can be installed as a desktop or a mobile application. This makes it possible to launch Dagger Cloud like a native application and get a full-screen experience without needing to open a browser first, or just have a dedicated icon in your desktop taskbar/dock", so it sounds like the "Native App" is using a Webkit (e.g. Wails, Tauri, Electron)
Anyway, congrats on having commercial users building stuff with your project!
In a previous version, I was using HTML, but it was written as strings. This allowed interaction with Go, but debugging was challenging since the Go compiler does not check the content inside strings, and no editor provides syntax highlighting for HTML embedded in a Go string.
With the current approach, the compiler can validate the written code, making it easier to use other Go code and enabling auto-completion in editors since everything is defined in Go.
Additionally, it eliminates the need to parse HTML, as every node state is represented in a Go-based virtual DOM, with only updates being pushed directly to the actual HTML nodes.
The key point here is that the UI can integrate background mechanisms written in Go, making them easy to use within the interface.
> Additionally, it eliminates the need to parse HTML, as every node state is represented in a Go-based virtual DOM, with only updates being pushed directly to the actual HTML nodes.
That looks really interesting. I'm curious, are there any performance drawbacks to updating DOM via WebAssembly or is it negligible? I.e. let's say you are building an editor of some kind. If the entire app is in Go, that means sending the keydown event to the WASM module and having it update HTML back. Is it not better (from performance perspective) to just use JavaScript all the way?
I find that font very beautiful and pleasant to look at.
That said, the licensing seems completely out of touch from reality to me. Today we are living in the cloud area, where data and and workspace are replicated across devices. When I read that you need multiple licences to have it on more than 2 personal devices, that sounds too much of a hassle to consider buying it.
Some people work their ass to make a living and even if ads are annoying, for a lot it is what's keep them moving forward.
Maybe Google makes money by selling other people content but they provide all the infrastructure to allow content creators to have their business first.
Bypassing the ads is hurting mainly content creators, not Google...
It hurts both. If people support the YT creators they watch on Patreon or in some other way, that's fantastic. But you should support them in some way if you watch and appreciate their content.
Hey folks, just find this post, I’m go-app’s creator. Looks like a bunch of the discussion is about the wasm size. When its gzip it is not that big. People are talking about 15MB, none of my projects reached that size, and they are usually pretty liked by my users.
For the syntax, it is a matter of tastes but things that people like about it is that its full Go and everything is discoverable from your editor with auto completion.
At the end what’s matter is that it’s good enough to build beautiful UI only by using Go and it’s ecosystem.
A couple of years ago, I went to work in SF area and I switched my dev environment for MacOS.
On my free time I love to do some apps and when I started to learn Swift and Cocoa, I got tired of dealing with same things with platform specific complicated stuff.
I decided to build by own GUI tool, written with the Go programming language.
A couple of iteration later (years), it became a WebAssembly library for building progressive web apps.
It is named go-app and you can see how it look like with this dogfooded documentation website: https://go-app.dev
If you like lofi music when working, or you are a fan of World of Warcraft game, there is those 2 others ones built with this package:
https://lofimusic.app and https://murlok.io
Of course some of these things are subjective and it's perfectly valid to explore alternate approaches, but I personally don't see the value proposition yet for doing things this way with Go
Going to avoid getting into a religious argument, but it's my view that TypeScript's types are much stronger and more expressive than Go's. There are some holes, but the mere fact that you can distinguish nullable from non-nullable gives it the edge from my perspective.
I agree that TypeScript has a more expressive type system (not an advantage depending on how you view things, however).
The big asterisk I am referring to is the fact that types are defined through a side channel rather than through the language itself. Your typing files may be different than someone elses. Everyone just so happens to use the same ones, so this problem doesn't come up too often in practice, but in applications where you need guaranteed static analysis, Typescript doesn't fit the bill.
I found then lost the reference to lofimusic.app, and could't find it again until today, so I'm overjoyed to stumble upon it again, as well as this new thing!
WASM give us an incredible amount of new possibilities and hopefully, we will get to a point where Go will be used in production also for GUI/apps purposes :)
Hey, I love your go-app library! I wrote a blog post using it here https://maori.geek.nz/a-web-app-using-bazel-golang-wasm-and-... and have used it on multiple small experimental projects. I have plans to use your code, either as inspiration or direct dependence, for many of my future projects! Cheers :)_