HTMX: It’s Nothing New

I’d like to start by saying that I’m sorry if I’m about to burst anyone’s bubble here, but HTMX is nothing new. In a way, I think it’s a case of having experienced the industry go full circle, again.


A Trip Down Memory Lane

I recall, in my first few jobs, I was pretty much implementing this, back in the old days where it was the industry standard to use jQuery religiously. And we’d use jQuery out of choice, because there were no better alternatives at the time, but this post ins’t about jQuery.

In this section of my post, I’m going to discuss how I basically implemented HTMX myself, only I didn’t try to put a badge on it or make out that it’s anything new. It might be that I was a junior developer at the time & I was simply unaware, but I thought it was pretty much a standard approach.

I recall defining HTML elements using data attributes which looks very similar to the HTMX syntax. Where you could define a navigation system, what it would swap out, etc. The rest was really basic jQuery, using the likes of fade in, fade out, document ready & so on.

Now granted, my implementation was nowhere near as fleshed out as the HTMX library. I’m not trying to make any claim to fame here, I just wanted to share the comical reality that I’ve been doing this for years without realising.


The Industry

I’ve spoken with several senior developers in my time, some of which have 20 years experience on me & then some. They’ve all said how they’ve seen this happen time & time again over the years, there’s a big craze, then it dies down, then another one comes along & this keep happening, but there’s always some repetition, be that some design pattern, some idea or some theory, etc.

I guess it’s somewhat like the endless loop of people loving a certain language, then suddenly a bunch of people hate it. Like Ruby, I recall back in the day, it was the new, trendy thing, then it just went silent & today, I’ve seen it making a bit of a comeback. I’m not specifically looking at Ruby here, I’m simply using the language as an example. I can even recall a time where some people would use ruby gems to manage some front end build/deployment tasks. But even the trade-offs of performance & code maintainability, this is another thing that we’re forever debating.


Context is King

I really am a firm believer that context is king when it comes to anything software related, and in all honesty, there was once a time when I would’ve used a standard approach to doing things, regardless of what I was trying to do. I would simply use the same tools, the same languages, etc. But by learning the hard way, it certainly made it clear to me, that sometimes you just have to use a certain toolset that you’re not overly familiar with. Sometimes you have to use a certain architecture that might be new to you, etc.

So while I’m a big fan of HTMX, like I’ve said, I used to do it years ago without realising it. I do know that it’s not always the best approach. Not to say you can’t achieve the same end goal, but it’s just another tool that can make certain jobs easier & like nearly all tools in our domain, if used in the incorrect case, it can make life a lot harder than what it needs to be.


Takeaway

If you want to learn anything from this post, just know that it is without a doubt a nice practice/tool to use. Just make sure that you don’t fall into a similar trap I fell into in my more junior years, where I would use a hammer on everything, because I saw everything as a nail. It is without a doubt a great way to shoot yourself in the foot & ironically, for personal/side projects, I encourage that, I encourage you shoot yourself in the foot. It’s unfortunate that humans learn really well from making mistakes & hacking horribly iconic & beautiful monsters. I recall a time, I tried to do some 3D stuff in CSS. Horrifying, I’d never use that in production, but man that was a learning experience & then some.


Conclusion

I genuinely believe that it’s a part of human nature to repeat ourselves, rather than a lack of innovation or people lacking creativity. You don’t know what you don’t know & when approaching something that might be new to you as an individual, you may follow a similar process to others, where you come to a similar way of doing things. In my opinion, that’s kinda a good thing, since it shows a clear pattern, and granted, you can use the philosophy that history doesn’t repeat itself, but it often rhymes. Sure, you can apply the same idea to the world of tech, Java became super popular back in the day, it’s still somewhat popular. But then another big trendy thing that aims to deliver the same fundamental promises & values as an older technology, in this instance, we can look at Node.js & Java side by side.

Even the likes of MVC, I have a friend who has a good number of years experience on myself & he says that he would often work on MVC projects back in the early 2000’s, then it sorta went away for a while. Don’t get me wrong, MVC, like many other things in the technical world, it never truly died, it only evolved. But even the likes of MVC appears to be making somewhat of a comeback in some parts of the technical world.

All in all, I love to see the simplicity of ideas such as HTMX & I honestly hope to see more ideas & technologies evolve around simplicity, after all, I’m not a smart person, I can admit that, I like to keep things simple. I only like to think about complexity as a last resort, I only tend to consider complexity when it’s a necessity & is no longer an option.

Similar Posts

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments