Live data from Hacker News

Show HN: A Full-Stack Web Framework for Go

github.com

51–60 of 103 posts

Re: Show HN: A Full-Stack Web Framework for Go

#51
post #12

Glad to see progress in this space. I couldn't find anything describing the paradigm used for the JavaScript frontend. From the video, it looks like things are fully server side rendered, i.e. no client side routing as-in SvelteKit or Next.js? Are the Svelte components hydrated+interactive after page load? In my experience so far with SvelteKit and other SSR+SPA frameworks, there are too many tradeoffs with hydrating…

Hey, excellent question. You're correct that Bud server-side renders the Svelte files, then hydrates them on the client. This is similar to what most other JS frameworks do, it works like this: 1. Create two builds: one for server, one for browser. This is done using ESBuild. This is actually done lazily upon request, similar to how a CDN like esm.sh would build JS to be imported. This will hopefully allow the build…

I should add that lazy builds only happen in development. In production, it's all bundled at once.

Re: Show HN: A Full-Stack Web Framework for Go

#52
post #13

> Build a Minimal Hacker News Clone in 15 Minutes with Bud I started my programming career after following the Rails how to make a blog in 15min youtube video. Always a good choice.

Samesies! I'll be recording a weblog demo in one of the upcoming releases. Need migrations and database access first!

Fun fact: It took DHH a year after he first introduced Rails to get that famous weblog demo up. This stuff takes time :)

Re: Show HN: A Full-Stack Web Framework for Go

#53

Congratulations on shipping. The demo looks great. I see views and controllers in the documentation, but the only mention of model is that "model" is a reserved directory. What are your plans for models and persistence?

Thanks for your comment and question @onionisfruit. Top-notch handle too!

>> What are your plans for models and persistence?

I haven't worked out all the details, but it's going to be some blend of https://github.com/xo/xo and https://sqlc.dev/.

Design goals:

1. High-level, type-safe "ORM" that's generated from your database schema.

2. sqlc as a fallback to cover the more complex SQL queries in a type-safe way.

The hard part is going to figuring out how to support extending the ORM with your own custom methods, hooks, computed fields etc.

What do you think?

Re: Show HN: A Full-Stack Web Framework for Go

#54
post #20

Very interesting, and using all of the latest tech. I was literally dreaming about combining Remix + Cloudflare Workers + Golang the other day. The only problem is Go would need to be compiled into WASM for that [0]. But this would provide one of the best experiences both in terms of development and performance/latency. [0] https://community.cloudflare.com/t/support-golang-natively-f...

It seems like fly.io is the best option right now for edge-optimized Go apps. My dream would be that Bud becomes something that Cloudflare simply can't ignore :D

Their reliance on V8 Isolates will make it difficult, but if they add Docker support at some point, then we're good. I don't see how Bud would work with WASM at the moment, but if someone gets it working, that would be a very pleasant surprise!

I'm more focused on getting Bud working well for deployment targets like Fly.io, Heroku, Lambda, K8s, Fargate and EC2.

Re: Show HN: A Full-Stack Web Framework for Go

#56

Great work. The last bit about single binary is quite interesting. I could easily deploy app to my raspberry Pi without worrying about bundling things. I know Go can do this but it's nice that framework aligns with Go philosophy.

Bud on a raspberry pi sounds like a fun weekend project! Let me know if you give it a shot!

Re: Show HN: A Full-Stack Web Framework for Go

#57
post #28

Earlier quoted context omitted.

To me I think the approach of Hotwire, LiveView, Django-HTMX etc. is more interesting for a Go framework, since websockets/async are baked into the Go language. In other words, render the HTML in Go and ship the diffs to a small blob of JS running in the client over a websocket, instead of baking a whole React build into your server-side app. Much simpler toolchain this way, much easier to reason about. I appreciate…

Where nextjs kicks ass is that coding front end interaction (sans back end interaction) and doing interaction in response to server feels almost identical. There is no “ugh ok … better set up react now” feeling to make say an interactive chart because it was always there. Similarly there is no “ugh ok … better set up a backend now” feeling you get using create-react-app as it was always there. There is almost no ment…

I just want plain HTML and some of {{ .These }}

Re: Show HN: A Full-Stack Web Framework for Go

#58
Wow 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.

Re: Show HN: A Full-Stack Web Framework for Go

#60

This is really cool! I tried building something more basic than this a few years back, but this looks a lot more mature. I'll definitely be following and testing it out on a few small projects.

Thanks @dougbarrett! Let me know when you give it a shot! I'd be curious if there's anything your implementation that you'd like to see in Bud. Hit me up at hi@livebud.com or on twitter @mattmueller.
Post reply on HN