2022-01-27 Django, HTMX and Alpine by Dan Jacob 🐍 + </> + 🌲= ¶
Over the past year or so I’ve been closely following an interesting trend in web development in which a wave of new libraries and frameworks allow developers to build modern web applications more simply, cheaply and quickly.
The current dominant paradigm in web development is the Single Page Application or SPA architecture.
The API communicates with the frontend through JSON payloads, with the frontend having sole responsiblity for rendering the data in the DOM.
The SPA model downsides ¶
The SPA model however also comes with a lot of downsides. Logic such as form validation has to be duplicated between client and server. You may have to host two separate applications in different domains, adding complexity to otherwise “solved problems” such as authentication.
There are solutions to these issues, from SSR to GraphQL to CORS, but they entail further complexity and more dependencies.