The stack overview
Who is it for?
What is it?
The AHA Stack is built upon the fundamental technologies of the Web:
- Web Servers
- Web Browsers
- The DOM
- Browser events
- Forms and FormData
- XHR, fetch(), Request, Response
Those are the founding technologies that power the Web. Together, they form the Web Platform. Those are our north stars. Industry standards. Set in stone.
They’re never going to change, they’re rock solid, they just work, they never get a “version 2.0” that breaks compatibility, because that just doesn’t happen.
- a language used to create user interfaces declaratively (HTML)
- a language used to style user interfaces declaratively (CSS)
- a way for clients to request data from a server (HTTP)
- a way to send data from a client to a server (XHR / fetch)
But that’s not enough to build modern Web Applications. We need something more. Something on top of those primitives, to make our life easier, and help build applications.
That’s where The AHA Stack comes into play, providing a few things that can greatly enhance the Web Development experience, and the kind of applications we can build.
We should use the platform as much as possible, without reinventing anything, in order to take advantage of all the technology that the Web provides us.
So here’s the idea.
We introduce a library that makes it easier to manage HTTP connections to our servers. When the user does something specific that needs to trigger an action on the server it creates the request, get some HTML back, and inject this HTML directly into a portion of the page.
We use this library to handle interactions once the page is loaded. So for example the user clicks a link, and we load some data from the server, which returns the data as HTML, and we add it to the page dynamically. Sending HTML over the wire.
The library should allow us to send any HTTP method to the server, be it POST, GET, DELETE, PUT or PATCH.
Then, we need a way to serve HTML pages over HTTP. A Web Server, basically. Nothing new here. We use the Web Server to build a Multi Page Application (instead of Single Page Application). A Web Server that can handle server-side rendering and communicate with a database to fetch (and store) data. The only thing this tool needs is the ability to handle HTTP responses, communicate with a database if needed, and reply with full HTML pages, or HTML partials.
We have routes, each route serves the HTML of a page, generated server-side.
The Web server does it all. Old-school.
That’s how the Web is (was?) supposed to work.No need to fight the framework to do basic Web stuff. It just works.
In the end, we add 2 tools on top of the Web Platform, to:
- Make it easy to create client-server interoperation
- Add client-side interactivity to each page
Those will make it easy for us to ditch the “virtual DOM”-style SPA frameworks complexity, and build better and more maintainable apps, faster.
I propose the “AHA” toolset: Astro, htmx, Alpine.js.