
"Alpine AJAX is a lightweight alternative to htmx, which you can use to enhance server-side rendered HTML with a few attributes, turning <a> and <form> tags into AJAX-powered versions. No more full page refreshes when you submit a form."
"The view does too much work. Every POST action calls get_context, which fetches everything: the article, the parsed Markdown body, the comments, the like state, the comment form."
The transition to an all-Django stack with Alpine AJAX has led to significant changes in approach and opinion. Alpine AJAX enhances server-side rendered HTML, allowing for partial page updates without full refreshes. The original implementation used django-template-partials to manage template sections, but issues arose from the view handling too many responsibilities. Each POST action required fetching all data, leading to inefficiencies. The new approach aims to streamline processes and improve performance by reducing the workload on the view.
Read at Loopwerk
Unable to calculate read time
Collection
[
|
...
]