Dauros
With some constraints you can create a page that works with or without JS. The same endpoint can be used for serving HTML fragments for HTMX and full page for JS-disabled clients since the HTMX request can be detected by the HX-Request header.
- Infinite scroll: HTMX detects the specified viewpoint and requests the next batch of content. The backend returns only the rendered partial HTML content that HTMX appends to the bottom of the page.
- Next page of a paginated content: if the users clicks on the 'Next page' button, the backend returns only the rendered HTML content of the next page, HTMX replaces only this part of the page.
- Form submission/validation: you can skip most of the frontend validation and use the backend for it. If the form has an error, HTMX replaces the new rendered form with the inlined error messages. Otherwise it can forward the user to the next page or shows some success message.
- Inline edit: e.g. click on the row in a table to load a small form just for that line. After the submission the backend returns the updated rendered table.
- Chained select input elements: when the user selects something in the first dropdown, it triggers an HTMX request that loads just the next select element that reflects the value of the first one.
- Background task with progress bar: just return a delayed, automatically triggered HTMX request from the backend until the task is finished. The status (e.g width) of the progress bar is also calculated on the backend.
- Search preview: with the builtin debounce filter trigger a search request that returns the search suggestions.
- Multiple small(er) updates on the page: one HTMX request can return multiple HTML partials that updates any part of the page. If you couple it with the builtin automated polling/websocket, you can build a live dashboard easily.
Of course you can do any of these with a SPA framework coupled to the backend API. But with HTMX you don't have to write a single line of JS, just put some htmx-something="..." attributes in the backend template files.
[1]: https://github.com/joplin/plugins/blob/master/README.md#plug...
[2]: https://github.com/agerardin/joplin-plugin-knowledge-graph
[3]: https://github.com/treymo/joplin-link-graph
[1]: https://dramatiq.io/
Without refactoring the factory planning phase would be more difficult since I don't want to fill the best places on the map with unmaintainable, non scalable factories. Refactoring should be very easy, e.g. like in Factorio with construction bots: just press ctrl + x and the bad part of the factory is gone.
If you want to build an abomination, try SeaBlock mod [1] for Factorio. You don't have to refactor anything, space and resources are infinite, so just build a new factory next to the old one after you research a new tier of technology.