HTMX and Go yields ConwayFirewood.com

Go is awesome!

While most of my "developer" credentials, and my strongest, are "backend", I also have and practice a strong "front end" skill set.

I started originally doing web development professionally in an Oracle + HTML environment. This was in '08 and we didn't even have HTML5 yet IIRC nor e.g. Canvas.

In my work, I was doing mostly database development, but the database also drove the student-teacher ERP system at the university I worked in at the time (University of Arkansas at Little Rock).

So, this guy John and I, we noticed every time for example you changed a drop down box to select a different department (switching from like philosophy to math, for example), the entire page would reload just to populate the next drop down which was a child of the one you just changed.

And then, when you changed THAT drop down, the whole page refreshed again.

Ok, so that's how it was in '08. We used JQuery to solve that. The solution was just to use AJAX and JQuery to only refresh the small piece of the DOM which you want to refresh. And so that's what we did. And there were a lot more limits than now, because for example Microsoft IE wouldn't let you change large sections of the DOM, so you might have to regenerate an entire <Table> element instead of just one row, BUT it was a huge improvement and helped server performance.

Then came React. I've been working with React almost 10 years now I think. This site is built in Gatsby, a React framework, and it works well enough and worked to deploy in a serverless environment.

But otherwise, React sucks. They did a good job, it's just too complicated and the long-short is that we should never have tried to use Javascript on the backend AND should not have tried to make JS so ubiquitious.

So now, in comes HTMX. And Go

And now, I'm doing all my web development in Go as a backend and HTMX (and it looks like Alpine.js) for frontend. Keep the front ends simple and reduce page loads by only loading the small HTML fragments you need for that particular action.

And Go is just an amazing backend web language. It's compiled, typed and is just really nice and clean to work with. It reminds me a LOT of working in C, which for all it's difficulties is a simple language with few rules.

And with that I announce ConwayFirewood.com

ConwayFirewood.com I built because I was looking for firewood for myself and had trouble. I decided there should be a curated list of firewood suppliers and started ConwayFirewood.com. It's also a POC for Go - HTML (using Go Templates) and HTMX for fetching from the backend. I also intend to use Alpine.js as a general purpose js package for the frontend.

ConwayFirewood.com runs in AWS but it's not serverless, as such. It runs in a single Lightsail virtual instance. It has a minimal web server and a built-in database. Currently I populate new vendors by using the "Submit" button but that functionality is disabled in Production until I add authentication for admin.

Still, the site is now available and has 3 listed vendors for places. 

If you  want some firewood in Conway, Arkansas then go hit up ConwayFirewood.com.

Author: Marcus

Post Date: 2023-11-21

By Marcusstriking competent fellow