Skip to content

Commit 120e68b

Browse files
committed
Add JS frameworks post
1 parent e5c5041 commit 120e68b

1 file changed

Lines changed: 100 additions & 0 deletions

File tree

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
layout: post
3+
title: "Build for the Web, Build on the Web, Build With the Web"
4+
date: 2025-01-23 13:01:19
5+
categories: Web Development
6+
meta: "What is the real, long-term cost of adopting a JavaScript framework?"
7+
---
8+
9+
<p class="c-highlight">This article started life as <a
10+
href="https://www.linkedin.com/feed/update/urn:li:activity:7287827600968699904/">a
11+
post on LinkedIn</a>, but after some gentle nudging from friend, web custodian,
12+
and unwitting mentor <a href="https://adactio.com/">Jeremy Keith</a>, I’ve
13+
decided to publish and expand upon it here.</p>
14+
15+
If you’re going to build for the web, build _on_ the web and build _with_ the
16+
web.
17+
18+
If I was only able to give one bit of advice to any company: **iterate quickly
19+
on a slow-moving platform**.
20+
21+
In the last year alone, I have seen two completely different clients in two
22+
completely different industries sink months and months into framework upgrades.
23+
Collectively, they’ve spent tens, if not hundreds, of thousands of dollars
24+
rewriting entire projects just to maintain feature parity with the previous
25+
iteration. This is not meaningful or productive work—it is time sunk into merely
26+
keeping themselves at square one.
27+
28+
It’s a form of open-source vendor lock-in, and adding even the most trivial of
29+
performance improvements becomes impossible as frameworks obscure or even remove
30+
the ability to fiddle with the nuts and bolts. The worst thing? You get to do it
31+
all again in 18 months! The stack owns you, and you have an entire development
32+
team who might be paid one or two quarters every two or three years just to
33+
tread water.
34+
35+
They’re **iterating slowly on a fast-moving platform**.
36+
37+
The saddest part of it all is that these were ex-clients who had to re-hire me
38+
because with the ‘upgrades’ came severe site-speed regressions. As good as it
39+
may be for business, I hate going through the same work with the same client
40+
more than once. After all, you should never need to call pest control twice.
41+
42+
The web as a platform is a safe bet. It’s un-versioned _by design_. That’s the
43+
commitment the web makes to you—take advantage of it.
44+
45+
1. **Opt into web platform features incrementally:** To paraphrase my good
46+
friend [Ryan Townsend](https://twnsnd.com/), customers don’t want smooth page
47+
transitions—[they want a website that
48+
works](https://www.youtube.com/watch?v=f5felHJiACE&t=1202s). Don’t make your
49+
entire site a single page app just so you don’t have to retransmit a header
50+
and footer.
51+
2. **Embrace progressive enhancement to build fast, reliable applications that
52+
adapt to your customers’ context:** The beauty of opting into web platform
53+
features as they become available is that your site becomes _contextual_. The
54+
same codebase adapts into its environment, playing to its strengths, rather
55+
than trying to build and ship your own environment from the ground up. Meet
56+
your users where they are.
57+
3. **Write code that leans into the browser, not away from it:** By using
58+
progressive enhancement, you can opt into browser-native features that are
59+
usually faster, more accessible, more secure, and—perhaps most importantly to
60+
the business—maintained by someone else.
61+
62+
All of this seems painfully reminiscent. As far back as 2007, [Dan
63+
Cederholm](https://simplebits.com/about/) gave us
64+
[do&shy;websites&shy;need&shy;to&shy;look&shy;exactly&shy;the&shy;same&shy;in&shy;every&shy;browser.com](https://web.archive.org/web/20071212220950/http://dowebsitesneedtolookexactlythesameineverybrowser.com/)
65+
(the answer is _no_; I saved you a click). Almost 20 years ago, the discussion
66+
was around much more trivial, visual flourishes like rounded corners and drop
67+
shadows, but the sentiment still rings true today: shipping hundreds of
68+
kilobytes of JavaScript so you can give an otherwise static site smooth, soft
69+
navigations is entirely nonsensical. Nowadays, you can implement that with one
70+
line of CSS[^1] and the worst case scenario is that browsers that don’t support
71+
it simply traverse your site just like they were always designed to do. Your
72+
[escalator became stairs](https://www.youtube.com/watch?v=tqOkWWV6a_U).
73+
74+
The web platform moves slowly, and I understand that can be frustrating for
75+
developers who want to innovate, but over a decade of consultancy experience has
76+
taught me time and time again that the alternative is much more restrictive in
77+
the long term. What’s brand new today starts to show its age much more quickly.
78+
79+
Every layer of abstraction made in the browser moves you further from the
80+
platform, ties you further into framework lock-in, and moves you further away
81+
from fast.
82+
83+
I remain convinced that the typical developer doesn’t know enough about business
84+
analysis, and the typical business analyst doesn’t know enough about
85+
development, to fully reconcile the two sides of the coin. The lock-in (and its
86+
ongoing cost) is very real, and today’s shiny will become tomorrow’s millstone.
87+
88+
I’m not against front-end frameworks, and, believe me, I’m not naive enough to
89+
believe that the only thing a front-end framework provides is soft navigations,
90+
but if you’re going to use one, I shouldn’t be able to smell it.
91+
92+
[Nolan Lawson](https://nolanlawson.com/) said it best when he said [<q>the best
93+
SPA is better than the best MPA; the average SPA is worse than the average
94+
MPA</q>](https://nolanlawson.com/2022/06/27/spas-theory-versus-practice/).
95+
96+
If you’re going to go all-in on a framework or, heaven forbid, an SPA, give the
97+
long term some serious consideration, and make sure you do a really, really good
98+
job.
99+
100+
[^1]: `@view-transition { navigation: auto; }`

0 commit comments

Comments
 (0)