TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Response to "Have Single-Page Apps Ruined the Web?" (2021)

34 点作者 tie-in大约 1 年前

8 条评论

llmblockchain大约 1 年前
I built a fairly large SaaS app using HTMX and Alpine. It has worked wonderfully.<p>HTMX really shines in a few areas for me.<p>1. Async loading of things (ex: render a dashboard and THEN load the chart data) to prevent blocking page loads.<p>2. Lazy loading of things (ex: Instead of rendering a modal for every row in a table, fetch and display the modal when the row edit button is clicked).<p>3. HX-Boost is nice. I have always been a fan of Turbolinks (classic) and preventing full page loads and allow permanent page elements. Boost makes it possible out of the box.<p>4. It leaves wiggle room for progressive enhancement. For example, if you are lazily loading a modal but JS is disabled, you could open a separate page for the modal&#x2F;form instead of lazily fetching and displaying in-page. It&#x27;s more work, but at least it&#x27;s _possible_.<p>Alpine on the other hand is nice for different things. I mainly use Alpine for things like handling a dropdown, slideout, animating things, etc.<p>All of this is done without writing any JavaScript. I am able to stay in my HTML templates or backend (in Golang) without ever touching JavaScript. I also adopted Tailwind for the same reason. I essentially write the CSS in the HTML (with classes) and let tailwind compile and generate the CSS for me... no more unused CSS. No more CSS clashes, naming conventions, etc.<p>It&#x27;s a great workflow.<p>edit:<p>I just wanted to say I use HTMX with the head-support plugin bundled together. @recursivedoubts, hoping for 2.0 soon to come with support built in :)
recursivedoubts大约 1 年前
i&#x27;m the author and I think this article holds up pretty well, particularly the &quot;Javascript: The Resistance&quot; part<p>one thing that I didn&#x27;t note in that section regarding edge computing is that if the data store isn&#x27;t edge, then putting compute on the edge doesn&#x27;t help that much, which vercel has started to admit (<a href="https:&#x2F;&#x2F;twitter.com&#x2F;t3dotgg&#x2F;status&#x2F;1781881405397442947" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;t3dotgg&#x2F;status&#x2F;1781881405397442947</a>).<p>i&#x27;ll state my position again: htmx makes hypermedia a more competitive approach for many web applications, but it isn&#x27;t right for everything. i&#x27;m not puritanical about approaches and agree strongly w&#x2F; Rich&#x27;s take on &quot;transitional apps&quot; where you use the right tool for the given job.<p>where i&#x27;d probably disagree w&#x2F; Rich is where the line is: i think w&#x2F; things like htmx (or unpoly or hotwire or datastar, etc.) the total space of problems that can be effectively addressed with hypermedia expands significantly
SahAssar大约 1 年前
I really dislike the discourse around htmx. I think the closest words I can use to describe it is glib, insincere and reductive (and yes I get that it&#x27;s supposed to be meme:y).<p>It pretends to not be a JS library&#x2F;framework while it is. It tilts at windmills that are badly structured&#x2F;built apps.<p>I agree that most webapps are built on too large libraries. I agree that the dependency chains are crazy. etc. etc.<p>But the solution proposed by htmx is IMO bad and the self-righteous tone is even worse.
评论 #40163659 未加载
评论 #40163338 未加载
anothername12大约 1 年前
I would like to shitcan our front end team, and replace the app with a stupid-simple MPA with some sprinklings of HTMX that even a “backend” dev won’t have too much trouble with, but I can’t - we’re in too deep at this point.<p>We had a 2 two-week sprints where they couldn’t decide on a date selector and had to build our own. Then there’s this huge GraphQL monstrosity we have to support the front end - but it’s better than REST, I think?? Ah I could rant..
usrusr大约 1 年前
How does all the &quot;executed once on the first request&quot; and video keeps running work in htmx? Is it an SPA, from the browser&#x27;s perspective, just an SPA that follows the MPA model, in its interactions with the server, basically applying a diff to the SPA state? Not saying that&#x27;s a bad thing, just trying to understand. Could be an awesome migration path to get some SPA benefits into an existing MPA.
评论 #40163613 未加载
martinbaun大约 1 年前
Using HTMX is a whole new way of thinking compared to the &quot;modern&quot; javascript framework-style.<p>I love it, but it takes some time to get used to.
评论 #40163479 未加载
评论 #40171549 未加载
评论 #40166533 未加载
coffeeindex大约 1 年前
HTMX is one of those things that I love the idea of, but I haven’t yet used it in a way that I really enjoy. Go’s HTML templating made it fairly good but it still didn’t feel great to use.
评论 #40163367 未加载
评论 #40163133 未加载
a_wild_dandan大约 1 年前
Controversial prediction: the web&#x2F;applications will largely calcify around TypeScript&#x2F;React&#x2F;Node.js&#x2F;Electron.<p>Reasons:<p>1. It&#x27;s...already happening. (See: job listings, big web platforms, popular desktop apps.)<p>2. Deploying one unified codebase on the web, mobile, and all major desktops is a phenomenal value. Nobody cares that HN people hate the lack of native controls, slower performance, memory usage, whatever. Good enough is good enough.<p>3. Vastly less friction hiring from the world&#x27;s largest dev pool and onboarding them to codebases written with familiar tech.<p>4. TypeScript&#x27;s system blow away most other type systems, and sharing them between front&#x2F;backends is a big deal.<p>5. Node.js can do nearly anything, is fast (enough), and pulls tools from the largest community of packages on Earth.<p>6. UI frameworks often heft around piles of heavy abstractions. Nobody wants to learn yet another awkward, shitty programming language that you invented with your templating system. Or the heap of classes needed to do basic things &quot;properly.&quot; React avoids this junk and stays simple -- write everything in pure TypeScript (no templates!), declaratively, with a minimal lib. KISS.<p>To save time replying to common misconceptions: No, JSX is not templating; Yes, tech&#x2F;tool competitor ABC exists -- TS&#x2F;Node&#x2F;React&#x27;s momentum will slowly kill it; If you like kitchen-sink frameworks, plenty of extremely popular&#x2F;polished&#x2F;active ones exist for making SPAs, MPAs, and mixtures between using React; Yes, programming problem space XYZ won&#x27;t adopt this stack due to particular constraints, you&#x27;re missing the point;<p>There, hopefully I pissed off everyone with my overly snarky and opinionated position. I deserve the hate. (I&#x27;m still right, tho.)
评论 #40164617 未加载
评论 #40164371 未加载
评论 #40164791 未加载