Hacker News new | ask | show | jobs
by mattgreenrocks 1213 days ago
Rails is probably the best framework still. But it still feels too low-level. I don’t want to care about the mountains of Web gunk there are: JSON serialization, HTTP methods, cookies, etc. Lack of static typing really hurts the maintenance story, too.

I really just want to write business logic, wire that up to endpoints in a nice DSL, and move on.

Most web frameworks seem to be obsessed with the web platform to the point they feel more like glorified macros, leaking its web gunk everywhere.

5 comments

Yes, but - if you don't understand how the web works and that it's made of HTTP and JSON and databases, you're probably going to find yourself trying to solve a problem you don't understand very quickly. I've always wanted to build a nice chair or cabinet, but I don't have the tools or the experience. It's not the tool's fault.
There is quite a lot of inherent complexity of web as a platform. If frameworks were any more abstracted they would be too brittle for a lot of use cases.

Btw, use Sorbet for Ruby static typing. It's very ergonomic.

We adopted Sorbet for our codebase a couple of months ago, and I couldn't be happier with that choice. Sure, it's not as powerful as Typescript (e.g. no way to specify a union of constants like `type Result = 'ok' | 'error'`), but it's worth it just for the nil-check alone. And it's great for documenting too. It's easy to forget what type a method expects for its parameters.
Django is nice, and python's type hints can be nice. Why not have a nice django?

>I really just want to write business logic, wire that up to endpoints in a nice DSL, and move on.

Not really sure what you mean, but django ninja? https://django-ninja.rest-framework.com/

Just write a function, use type hints to say what arguments it takes, and throw a decorator onto it. Very similar to fastApi but with the django framework behind it.

Cough phoenixframework.org cough
It is definitely closest to what I want. I need to give it an honest try.
You should check out Wundergraph coupled with a backend framework to at least manage the database schema. Check out this video [1] it's so fast and nice.

[1] https://www.youtube.com/watch?v=m3YrZav5-CU