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…
I only browsed for a wee bit, so take this with some salt, but it _looks_ like the framework is running a JS VM isolate alongside the Go server struct[1], which gets called with whatever script file is being rendered. Since it looks like the render files are, at least in the case of Svelte, individually compiled JS files that are SSR rendered via the V8 isolate, I _believe_ you're correct that there is no CSR (though…
Show HN: A Full-Stack Web Framework for Go
41–50 of 103 posts
Re: Show HN: A Full-Stack Web Framework for Go
#42Any 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.)
It was a tough call, but I ultimately decided to server-render JS. This thought-experiment helped:
• If Ruby could natively render Javascript, would they still choose the Hotwire approach? I concluded no. I don't see the reason to have multiple approaches (HTML over wire, Stimulus), when one solution would suffice. The one solution also happens to be way more familiar to today's frontend developers. I definitely didn't want to make another templating language.
Bud will eventually ship with it's own JS evaluator. Either through https://github.com/dop251/goja or through porting https://github.com/bellard/quickjs to Go (~25kloc of C)
Re: Show HN: A Full-Stack Web Framework for Go
#43If you ever ship an Airflow integration, consider this an official request to call it Air Bud.
Re: Show HN: A Full-Stack Web Framework for Go
#44Your site's DNS is currently not resolving. Should provide alternate install instructions for cases like this. https://www.whatsmydns.net/#A/livebud.com
Re: Show HN: A Full-Stack Web Framework for Go
#45See also: Buffalo https://gobuffalo.io
Bud uses modern FE frameworks and leans heavily into making code generation work well to give you type-safety and higher-level APIs.
Buffalo is farther along in the journey with database migrations, mailers, etc.
Unfortunately, I think Buffalo is no longer in active development. The main author left his own #buffalo Slack channel in gophers.slack.com.
Re: Show HN: A Full-Stack Web Framework for Go
#46Re: Show HN: A Full-Stack Web Framework for Go
#47Cool project but I think building a full stack web framework in a language without features like operator overloading is a fool's errand. Yes, Go has nice standard templating and HTTP serving libraries, and nice dependency management. These are all important features for a web framework. No, it will never be productive as its competitors in the web framework space, because you simply cannot write expressions like `or…
Re: Show HN: A Full-Stack Web Framework for Go
#48People interested in this might also find my project Pagoda [0] interesting. It's a full-stack web dev starter kit for Go, rather than a framework with any strict patterns or lock-in. It leverages Echo (web) and Ent (ORM) but they can be easily swapped out, if desired. It also has HTMX [1] integration to create slick/modern UI behavior without writing any JS. [0] https://github.com/mikestefanello/pagoda [1] https://h…
Ent is a nice choice for the ORM. For models, I'm planning to go with a combo of sqlc + xo. I want to tie the DB schema to your application.
Re: Show HN: A Full-Stack Web Framework for Go
#49People interested in this might also find my project interesting: https://docs.goplaid.dev , https://github.com/goplaid/
I perused the documentation and I can tell a lot of thought went into this. I appreciate the simplicity and applaud all efforts to make Go a serious contender in the full-stack web framework space!
Re: Show HN: A Full-Stack Web Framework for Go
#50This looks cool. I know effectively nothing about Svelte so some of these questions may be coming from that ignorance....but can you talk more about the embedded V8 instance (what's it doing?) and also what gets sent across the wire? Is it the usual HTML and JS or is there any server-side rendering going on? How big is the binary for the HN demo? What's the story for static assets like video or images? I've started u…
Great questions. I answered some above, so I'll copy some and then answer your other questions below:
>> what's it doing?
Bud server-side renders 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. Both are built using ESBuild. In development, builds happen lazily upon request, similar to how a CDN like esm.sh would build JS to be imported. This will hopefully allow the build system to scale for larger apps. Vite was my inspiration here, but it's all done in Go.
2. V8 and the Svelte compiler are baked into the bud binary. When a request comes in, V8 evaluates the compiler running the server-built page and returns HTML. That's a mouthful, hopefully that makes sense.
>> what gets sent across the wire?
What gets sent over the wire is HTML. That HTML then has a script tag which requests the client-side version of the page that's used to hydrate the HTML and make the page interactive.
>> How big is the binary for the HN demo?
I just checked the binary size and it's 47.6 MB. It's mostly V8 right now, but will definitely get larger as you add more assets. I haven't tested it yet, but hopefully you'll be able to rsync just the diffs to a server.
>> What's the story for static assets like video or images
You can add them in the public/ directory. There's documentation here: https://denim-cub-301.notion.site/Hey-Bud-4d81622cc49942f991...
---
Let me know if you give Bud a go on your side-project! Happy to go into more depth here, over email hi@livebud.com or on twitter @mattmueller