3 ms·
Some background for late viewers: I found htmx recently and it's exciting to me because its potential to vastly simplify website development experience without
by infogulch 3y ago
Some background for late viewers:
I found htmx recently and it's exciting to me because its potential to vastly simplify website development experience without compromising on user experience. One design principle that htmx is based on, Locality of Behavior, is particularly eye-opening. ( https://htmx.org/essays/locality-of-behaviour/ https://htmx.org/essays/locality-of-behaviour/ ) Yet despite htmx simplifying the frontend, actually writing the matching backend is still messy because existing tools funnel developers to separate concerns rather than co-locate behaviors.
xtemplate was written out of spite from being forced to jump between half a dozen files just to add simple backend functionality: define a new route, code up yet another repository, fight the ORM's stupid query generator, create a new handler, manually wire it up to a template, blah blah blah. Screw it, what if you just put everything in the damn html? I happen to be familiar with Go's template modules, and it turns out they are naturally suited to htmx apps because of their flexibility and the ease of defining and reusing inline template fragments.
So I ran with it and tried it with a todomvc-style app in the now archived `go-htmx` repo. Eventually I stumbled on Caddy's template module, and realizing that I could skip all the web server-related feature development by integrating with Caddy I rebased onto it to get a head start. The next thing it needed was a consuming project, small enough it could be completed in a reasonable time, but not so small that it's not useful. So XRss was born.