Once upon a time, while down the youtube tech rabbit hole, I came across a video by Maximilian Schwarzmüller, referring to some dark and disturbing magic called htmx that claimed to reduce if not remove your requirement to write javascript.
Well actually, htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes.
Of course, if you have used Symfony recently, you'll be aware of Hotwire's Turbo, Frames and Stimulus, which is fantastic. But what really struck me about htmx, is the ease of use and concise and practical syntax.
Sound too good to be true? Well let's have a look, to install simply include the script tag, I did this inside of my `app.js`
Type something into the text input... This feels illegal.
In my experience the majority of website and applications don't need the monstrous strength of React or contemporary JS frontend frameworks. Because let's be honest, most projects just don't have the feature requirement. This package is narrowing the gap between the backend and frontend and it does it so simply and eloquently.
If you are using PHPstorm like me, then you can install the HTML Support plugin which will give you attribute autocompletion, just to make your life that little bit easier.
I was speaking to a ex-colleague and dare I say friend, Fabricio and I theorised about the two problems that plague contemporary programming being firstly, the ever growing gap between the frontend and backend and secondly technical bloating, with the advent of frontend frameworks and HTTP/3, our software has become big, like really big. instead of one framework we now generally have 2, Two nearly completely separate systems, which increases complexity by a considerable degree.
But imagine if you can, a framework that was both frontend and backend simultaneously, where there was no gap between frontend and backend, no JSON tokens. A framework where you can access the browsers information (like timezone) anywhere. Where the functionality of htmx would be built in, by default. Now that is pretty cool!