Show HN: A Full-Stack Web Framework for Go
81–90 of 103 posts
Re: Show HN: A Full-Stack Web Framework for Go
#82Nice, with generics, some things that were hard are easier to do when it comes to polymorphism thus code re-use. Go community has been pretty "anti-framework" (AKA "just use net/http" when it clearly doesn't solve every problems..., "don't put request scoped variables in context" when it's the very purpose of that interface...) and there was a lot of drama around some framework creators, unlike any other web language…
I haven't actually used generics in any serious way yet. I haven't needed them. That being said, I'm happy they're in the language now and I'm really looking forward to seeing what the Go community comes up with during this period of experimentation.
I'm aware of the "anti-framework" ethos in the Go ecosystem. I think it comes from a good place, but there's room for other approaches. Go was created to build large-scale networked applications. The Go community deserves tools that are specifically designed for building web applications. Tools that are just as productive as Laravel, Rails and Next.js.
If this puts me at odds with some Go developers, I'm okay with that. We're probably just focused on different areas. Go is a big tent with plenty of room for different perspectives.
One thing I like about the code generation approach that Bud is taking is that there's more flexibility in the API design.
Need to break out of Bud's Controller conventions? Just pass a http.ResponseWriter and *http.Request and Bud will generate the glue code to wire everything up. You can go high or low-level depending on the problem that's in front of you.
I don't think this will appease the "just use the standard library" faction, but these kind of escape hatches will at least put a dent in their argument.
Re: Show HN: A Full-Stack Web Framework for Go
#83Re: Show HN: A Full-Stack Web Framework for Go
#84Interesting project, good luck with it! Can you elaborate how you were spoiled by Go and don't want to go back to writing PHP?
I switched from PHP to Node about 11 years ago. I was probably one of the first 100 Node.js developers. My biggest contribution there was creating https://github.com/cheeriojs/cheerio.
Go spoils me because it "just works". The best way I can explain it is when I'm stuck on something in Go, it's almost always my bad, not something that Go is doing poorly. This is in contrast to the Node.js ecosystem where it feels like half of the problems I run into shouldn't be my responsibility.
I strongly relate to this post by Kevin Burke: https://kevin.burke.dev/kevin/one-year-of-node-js/. A lot has improved since this was written. We're finally over the ES Module vs CommonJS hump, Typescript has become the defacto standard, Babel is less used now and Webpack is effectively abstracted away. I still run into way too many problems with the ecosystem and the transition to Rust will make the ecosystem more complicated, not less.
My transition from Node.js to Go happened because I was working solo on https://standupjack.com/ and I kept running into issues with the message broker. It was using the most popular RabbitMQ client for Node, yet it was still super flaky.
About 6 years ago, I was chatting with TJ Holowaychuk and he kept singing Go's praises. One holiday I decided to rewrite just the message broker in Go. I got it into production in 3 days and didn't have anymore problems with it. That set me on the Go journey :)
Re: Show HN: A Full-Stack Web Framework for Go
#85Oh wow someone finally went ahead with the server rendered js in Go ! Looks great. I have been experimenting various ways to build web apps in Go: https://github.com/adnaan/gomodest-template . I have landed on pursuing one approach more deeply: server rendered html templates over websockets. Don’t have a lot of documentation right now but here are some examples: https://github.com/goliveview/examples .
What's the advantage of rendering HTML templates over websockets? Is this similar to Hotwire where it sends you HTML fragments over websockets when you, for example, click on a button?
Re: Show HN: A Full-Stack Web Framework for Go
#86Any plans to implement something like Phonenix LiveView? I've never used Go, but from what I've read I suppose it should work really well given Go's concurrency model. (The name "Livebud" gave some hope as well.)
There is https://github.com/jfyne/live which is probably what you're looking for.
Re: Show HN: A Full-Stack Web Framework for Go
#87Oh wow someone finally went ahead with the server rendered js in Go ! Looks great. I have been experimenting various ways to build web apps in Go: https://github.com/adnaan/gomodest-template . I have landed on pursuing one approach more deeply: server rendered html templates over websockets. Don’t have a lot of documentation right now but here are some examples: https://github.com/goliveview/examples .
Love seeing people experimenting in this space with Go! One of my favorite things about this HN post is everyone is coming out of the woodworks to share their ideas. What's the advantage of rendering HTML templates over websockets? Is this similar to Hotwire where it sends you HTML fragments over websockets when you, for example, click on a button?
The approach is similar to hotwire except I only use stimulusjs and not use turbojs. turbojs doesn’t integrate well with html/template. In my approach, you can simply reuse the html templates you have already written with standard html/template package.
Sorry for the rambling, I haven’t gotten around to writing down all of it in a more structured way.
Re: Show HN: A Full-Stack Web Framework for Go
#88I have been working with Go professionally since 2015 and quite often it makes me feel frustrated due to lack of full-stack web frameworks.
I was thinking to do something like your project, but with focus to full SSR/zero-js. Lucky me, you started it first . Maybe be in some things I will prefer different approach, however, your project already released (and it's excellent) while mine only in prototype. After I read the documentation in your project it feels like you really stepped on a lot of minefields. Great job!
One thing is still bothering me though (or maybe I missed it in docs): how is Bud dealing with relative links? Very often JS writers forgetting about the situation when the application could be served under different root locations. Does Bud have helpers to construct relative URLs without relying on user-provided server url? (I made PoC for that - don't use it in production https://github.com/reddec/gin-template-manager/blob/eb09f4e8...)
Re: Show HN: A Full-Stack Web Framework for Go
#89Wow is this like Go version of SvelteKit? Except without SSR so it serves only static files? I just thought about the same thing recently and I'm glad somebody made it! IMO Go is better fit for server backend than Node.js, especially with I/O.
Yes, exactly. Even the creator of Node says so: "I think Node is not the best system to build a massive server web. I would use Go for that. And honestly, that’s the reason why I left Node. It was the realization that: oh, actually, this is not the best server-side system ever." Heavy computation still ties up the event loop in Node.js. We're just not talking about it as much because most people deploy to serverless…
But then he created deno....
Re: Show HN: A Full-Stack Web Framework for Go
#90Earlier quoted context omitted.
I just want plain HTML and some of {{ .These }}
You wish will be my command https://github.com/livebud/bud/discussions/8 :D