Elektrine lite

← Feed

@braid@alpaka.garden

Post #2254524

2026-05-07 09:02 UTC

I'm looking for a framework to build a website and web application. The language does not really matter. The key selling point would be support for both static HTML rendering of form submissions, search etc. while in best case automatically building a REST API as well so that non-browser applications can make use of the resources as well. The tasks are not complex, it's just querying a database. Is there anything you can recommend ? #FollowerPower #DuckDuckFedi

Replies (2)

  • @obelix@chaos.social 2026-05-07 09:13

    @braid@alpaka.garden My quick-win framework is Flask or FastAPI (both Python) for this kind of task.

    Open ##2277282

  • @dolanor@hachyderm.io 2026-05-07 13:24

    @braid@alpaka.garden Hi, totally shameless plug, but I tried to create something like that for a few years and succeeded to a certain level. It's https://rip.rest and it's basically a RESTful (not totally there yet, HATEOAS is missing) server. I tried to make it pluggable, so it doesn't bleed everywhere in your code base. And your business logic is basically the type you define. One of the smallest example is this: https://github.com/dolanor/rip/blob/main/examples/gormprovider/main.go And this allow you to have different representation of the resource based on content negociation. So if you want the JSON, send the "Accept: application/json" header. If you want HTML, "Accept: text/html" header will do. My default HTML templates use HTMX, to reduce JS to nothingness, while still making the webpages dynamic. And if you want to change it to create whatever HTML representation of your resource, just override it: https://github.com/dolanor/rip/blob/main/examples/html-template/main.go

    Open ##2277283