Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ktor + jOOQ + Elm + OpenAPIv3 generators for generating a type-safe Elm client and Kotlin DTOs for the serverside.

IHP (Haskell) w/ HTMX.

Elm + Lamdera; for small games (super low boilerplate).

Hasura (Postgres + authorization exposed as GraphQL w/ generated schema) + Elm + GraphQL generator for generating a type-safe Elm client.

Rust + Yew w/ Actix or Axum on the backend.

Rust + Dioxus.

The thing I propose is: use something that makes it hard (near impossible) to express runtime errors. Life's to short for fixing bugs, and in many cases business is too fast to write 95% test cov. You need safety baked into your langs/tools.



I like Haskell + htmx (HOWL stack).


But what Haskell libs you use on the back-end?


That's a personal decision.

You could use something like Yesod or even IHP (and that's batteries included). There is Servant, Spock, Scotty for lighter weight than those. There's also the newer hastl (haven't tried it). Yet if you are using htmx, you probably want to keep things simple. On the one hand, there is simplicity from having a framework already together for you. On the other hand you can get that simplicity from only having the dependencies that you actually want for your needs.

You need something to handle:

- server connection (everything is built on top of wai and warp). There's servant and scotty for lightweight layers on top of wai (which uses simple HTTP requests and responses)

- database persistence (for postgres - Persistent/Esqueleto, postgres-simple, hasql, Opaleye, etc.; for sqlite there is sqlite-simple)

- html templates (optional, but it does make writing html more convenient. blaze, lucid2)

- auth (server-session, client-session, or roll your own. Of course, stuff like Yesod gives you all of this out of the box)

- sessions (most people roll their own Session module. The reason is that it tends to be dependent on your database and other decisions you have made for routing, connections, etc.)

- routing (libs like Servant and Yesod come with routing out of the box. Of course, you could just route with strings, but why are you using Haskell if you don't want type-safe routes? There's also stuff like web-inv-routes that give you type-safe, composable routes.)

Ultimately, I think the best way to go down the bespoke path is to know what functionalities a web server/web app needs to have as far as categories like the above and then to build it up one piece at a time (maybe with side exploratory proof of concept mini-projects). If you don't have time for that, I'd just use one of the frameworks so you can ship.


I know all the options, and also believe that's a personal decision.

But I was literally asking --and curious to the answer to-- what "you" (would) pick.




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

Search: