Debian Codegraph @

www/src/content/essays/future.md

raw symbols SCIP
1 ---
2 title: "The future of htmx"
3 description: "In this essay, Carson Gross and Alex Petros discuss htmx's future direction and philosophy. They explain how the project aims to emulate jQuery's success through API stability, minimal feature additions, and quarterly releases while continuing to promote hypermedia-driven development and support the broader web development ecosystem."
4 created: 2025-01-01
5 modified: 2025-01-01
6 authors: ["Carson Gross", "Alex Petros"]
7 tags: []
8 ---
9
10 ## In The Beginning...
11
12 htmx began life as [intercooler.js](https://intercoolerjs.org), a library built around jQuery that added behavior based
13 on HTML attributes.
14
15 For developers who are not familiar with it, [jQuery](https://jquery.com/) is a venerable JavaScript
16 library that made writing cross-platform JavaScript a lot easier during a time when browser implementations were very
17 inconsistent, and JavaScript didn’t have many of the convenient APIs and features that it does now.
18
19 Today many web developers consider jQuery to be “legacy software.” With all due respect to this perspective, jQuery is
20 currently used on [75% of all public websites](https://w3techs.com/technologies/overview/javascript_library), a number
21 that dwarfs all other JavaScript tools.
22
23 Why has jQuery remained so ubiquitous?
24
25 Here are three technical reasons we believe contribute to its ongoing success:
26
27 * It is very easy to add to a project (just a single, dependency-free link)
28 * It has maintained a very consistent API, remaining largely backwards compatible over its life (intercooler.js works
29 with jQuery v1, v2 and v3)
30 * As a library, you can use as much or as little of it as you like: it stays out of the way otherwise and doesn’t
31 dictate the structure of your application
32
33 ## htmx is the New jQuery
34
35 Now, that’s a ridiculous (and arrogant) statement to make, of course, but it is an *ideal* that we on the htmx team are
36 striving for.
37
38 In particular, we want to emulate these technical characteristics of jQuery that make it such a low-cost, high-value
39 addition to the toolkits of web developers. Alex has
40 discussed [“Building The 100 Year Web Service”](https://www.youtube.com/watch?v=lASLZ9TgXyc) and we want htmx to be a
41 useful tool for exactly that use case.
42
43 Websites that are built with jQuery stay online for a very long time, and websites built with htmx should be capable of
44 the same (or better).
45
46 Going forward, htmx will be developed with its *existing* users in mind.
47
48 If you are an existing user of htmx—or are thinking about becoming one—here’s what that means.
49
50 ### Stability as a Feature
51
52 We are going to work to ensure that htmx is extremely stable in both API & implementation. This means accepting and
53 documenting the [quirks](https://htmx.org/quirks/) of the current implementation.
54
55 Someone upgrading htmx (even from 1.x to 2.x) should expect things to continue working as before.
56
57 Where appropriate, we may add better configuration options, but we won’t change defaults.
58
59 ### No New Features as a Feature
60
61 We are going to be increasingly inclined to not accept new proposed features in the library core.
62
63 People shouldn’t feel pressure to upgrade htmx over time unless there are specific bugs that they want fixed, and they
64 should feel comfortable that the htmx that they write in 2025 will look very similar to htmx they write in 2035 and
65 beyond.
66
67 We will consider new core features when new browser features become available, for example we
68 are [already using](https://htmx.org/patterns/move-before/) the experimental `moveBefore()` API on supported browsers.
69
70 However, we expect most new functionality to be explored and delivered via the
71 htmx [extensions API](https://htmx.org/extensions/), and will work to make the extensions API more capable where
72 appropriate.
73
74 ### Quarterly Releases
75
76 Our release schedule is going to be roughly quarterly going forward.
77
78 There will be no death march upgrades associated with htmx, and there is no reason to monitor htmx releases for major
79 functionality changes, just like with jQuery. If htmx 1.x is working fine for you, there is no reason to feel like you
80 need to move to 2.x.
81
82 ## Promoting Hypermedia
83
84 htmx does not aim to be a total solution for building web applications and services:
85 it [generalizes hypermedia controls](https://dl.acm.org/doi/pdf/10.1145/3648188.3675127), and that’s roughly about it.
86
87 This means that a very important way to improve htmx — and one with lots of work remaining — is by helping improve the
88 tools
89 and techniques that people use *in conjunction* with htmx.
90
91 Doing so makes htmx dramatically more useful _without_ any changes to htmx itself.
92
93 ### Supporting Supplemental Tools
94
95 While htmx gives you a few new tools in your HTML, it has no opinions about other important aspects of building your
96 websites. A flagship feature of htmx is that it does not dictate what backend or database you use.
97
98 htmx is [compatible with lots of backends](https://htmx.org/essays/hypermedia-on-whatever-youd-like/), and we want to
99 help make hypermedia-driven development work better for all of them.
100
101 One part of the hypermedia ecosystem that htmx has already helped improve is template engines. When
102 we [first wrote](https://htmx.org/essays/template-fragments/) about how “template fragments” make defining partial page
103 replacements much simpler, they were a relatively rare feature in template engines.
104
105 Not only are fragments much more common now, that essay
106 is [frequently](https://github.com/mitsuhiko/minijinja/issues/260) [cited](https://github.com/sponsfreixes/jinja2-fragments)
107 as an inspiration for building the feature.
108
109 There are many other ways that the experience of writing hypermedia-based applications can be improved, and we will
110 remain dedicated to identifying and promoting those efforts.
111
112 ### Writing, Research, and Standardization
113
114 Although htmx will not be changing dramatically going forward, we will continue energetically evangelizing the ideas of
115 hypermedia.
116
117 In particular, we are trying to push [the ideas](https://dl.acm.org/doi/pdf/10.1145/3648188.3675127) of htmx into the
118 HTML standard itself, via the [Triptych project](https://alexanderpetros.com/triptych/). In an ideal world, htmx
119 functionality disappears into the web platform itself.
120
121 htmx code written *today* will continue working forever, of course, but in the very long run perhaps there will be no
122 need to include the library to achieve [similar UI patterns](https://htmx.org/examples) via hypermedia.
123
124 ## Intercooler Was Right
125
126 At the [end of the intercooler docs](https://intercoolerjs.org/docs#philosophy), we said this:
127
128 > Many javascript projects are updated at a dizzying pace. Intercooler is not.
129 >
130 > This is not because it is dead, but rather because it is (mostly) right: the basic idea is right, and the
131 > implementation
132 > at least right enough.
133 >
134 > This means there will not be constant activity and churn on the project, but rather
135 > a [stewardship](https://en.wikipedia.org/wiki/Stewardship_\(theology\)) relationship: the main goal now is to not
136 > screw
137 > it up. The documentation will be improved, tests will be added, small new declarative features will be added around
138 > the
139 > edges, but there will be no massive rewrite or constant updating. This is in contrast with the software industry in
140 > general and the front end world in particular, which has comical levels of churn.
141 >
142 > Intercooler is a sturdy, reliable tool for web development.
143
144 Leaving aside [the snark at the end of the third paragraph](https://www.youtube.com/watch?v=zGyAWH5btwY), this thinking
145 is very much applicable to htmx. In fact, perhaps even more so since htmx is a standalone piece of software, benefiting
146 from the experiences (and mistakes) of intercooler.js.
147
148 We hope to see htmx, in its own small way, join the likes of giants like jQuery as a sturdy and reliable tool for
149 building your 100 year web services.