Hacker News new | past | comments | ask | show | jobs | submit login

I'm mainly a Go developer but I've picked up Rails when version 7 came out for all my hobby projects and it's just _fun_ to work with. I don't have to work with complicated frontend tooling and I just push to Dokku to deploy.



That new proxy they've developer "thruster" is written in go

https://github.com/basecamp/thruster


As a backend Go developer who had used Rails a lot many years ago, I recently had to do a full-stack project where I got to pick my own stack. I liked the idea of HTMX and also added a-h/templ into the mix. I feel like this setup allows me to be almost as productive as with Rails when doing things that Rails is good at, while enjoying the control and simplicity of the Go approach.


templ is great, it's been my go to when working on web stuff with Go.


One thing with a larger code base is always the guess work with what object you're dealing with and what properties/methods it does support or does not support increases with the time as the code base grows.

This does not become easier with monkey patching and open classes + lots of meta programming.

I started with Rails during version 1.x and went up to 2.x with it, good fundamentals of Rails have not changed and are the same (inspired others to adopt such as ORM/convention over configuration etc) but lately, I ended up with Go instead for being at least some type system no matter how crude and having a single binary in the end to deploy.

Never have to worry about pip/gem/npm crashing on me. Mostly.


What do you use for frontend tooling then? Somehow you have to compile scss and do some mild js bundling or so?


It comes batteries included so in theory I don't even have to think about it. I'm using the happy path of just making use of the included tailwind css setup where I know it'll work out of the box.

    rails new -d postgresql --css tailwind


Rail embraced #NOBUILD starting Rails 7.

No pipelines, no minification, no nonsense, just serving js and css directly.

Hey.com works like this, and they reported nothing but improvement.


Is it still possible to include minification, tree-shaking and bundling to propshaft or have they fully excluded these options?


BTW I wouldn't consider those to be "free" features. #NOBUILD allows assets to live much much longer in cache. with minification + whatevah, everytime you change something in a js file you invalidate the whole bundle, which means the client will have to fetch megabytes of javascript, potentially very frequently. So you need to see for your self whether the savings from minification outweigh the savings of caching.

Bundling is also something that we no longer need to do since the introduction of HTTP2. I would even consider it an anti-pattern these days, since it means you're sending the client much more data than they actually need.

Tree shaking is definitely very important for something like tailwind though.


Still possible, propshaft works perfectly with the official js-bundling and css-bundling gems which let you add any js build pipeline as a build step


Wonderful!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: