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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Htmx Is a Erlang

122 点作者 alfonsodev超过 1 年前

15 条评论

coolhand2120超过 1 年前
Reading that entire thing was a struggle. Really feels like _everyone_ is wrong here. Yes the current state of FE development is overly dogmatic and cultish. But it always has been. On the other hand the frameworks and build systems are solving actual problems, they&#x27;re not there for looks.<p>5-7 second skeleton loaders are there because backend systems are slow, not because of the front end application. You can say &quot;oh but you can pre-render&quot;, but there are times when you can&#x27;t. You could render the whole thing on the backend, but then you&#x27;ll wait 5-7 seconds at a white page vs. progressive loading. Whatever is taking 5-7 seconds (LCP) is not going to get faster for you in your region by some magical front end dance.<p>Not every business is the same and no one solution will work for everyone. And concluding that we should &quot;go back to jQuery&quot; really speaks volumes of the author. jQuery was not &quot;the good old days&quot;.<p>The problem with FE is that they seem to be wannabe nodejs BE devs instead of the W3C experts they should be. If FE devs focus on web standards and less on Rube Goldberg machines they would be well served.
评论 #38618209 未加载
评论 #38619405 未加载
评论 #38619232 未加载
评论 #38618184 未加载
评论 #38618258 未加载
miki123211超过 1 年前
&gt; htmx, a disciple of hypermedia, available only in hardcover do not look for alternatives, has been manifesting itself into existence recently<p>As a screen reader user with no way to read words written on paper (short of getting a scanner and spending hours on putting books through it), I <i>have</i> to look for alternatives. I hate it when authors do this. I get why, but it&#x27;s still frustrating.<p>There&#x27;s also the fact that the author of this article decided to embed X posts as unlabeled screenshots for some unknown reason. This breaks accessibility, copy&#x2F;paste, translations, flexible screen layouts and probably a bunch of other things I&#x27;m not aware of. Putting text in images is never a good idea, much less so when there&#x27;s a perfectly fine embeds API for GOd&#x27;s sake.<p>I&#x27;m really saddened to see somebody who claims to care about web standards be so dismissive of accessibility concerns.
评论 #38619486 未加载
评论 #38619314 未加载
eddd-ddde超过 1 年前
The whole &quot;htmx is the most dangerous thing to exist&quot; is so funny to me.<p>Someone that does not understand sanitisation boundaries has no business working on web development. This is how you end up with html in your database, people just render whatever piece of data because it &quot;just works&quot; in frameworks like react (I&#x27;ve seen it myself in production).
评论 #38618402 未加载
snowstormsun超过 1 年前
&gt; ah yes, the famous XSS coming from your own backend API calls…<p>Author does not seem to understand the concept of XSS. Of course your own API could return user-provided data to trigger XSS attacks. Entering &lt;script&gt;alert(1);&lt;&#x2F;script&gt; in a messenger to see whether its rendered value is escaped correctly is a famous example.
评论 #38619279 未加载
评论 #38619002 未加载
评论 #38619344 未加载
sshine超过 1 年前
&gt; <i>also, 25,000 hours in 15 years? what kind of rookie lazy piece of shit numbers are those? [...]</i><p>Since we&#x27;re bashing dumb comments with dumb comments, the Twitter comment is actually saying:<p><i>over 25,000 hours</i><p>Assuming<p><pre><code> - 5 weeks of vacation each year - 8 hours of work, 5 days a week </code></pre> That&#x27;s<p><pre><code> (52 - 5) * 5 days * 8 hours * 15 years = 28.200 hours </code></pre> If he worked any harder than that, <i>that&#x27;s still over 25,000 hours.</i>
jlundberg超过 1 年前
This read has a surprising amount of depth and funny style. Recommended if you enjoy conversations about web security.
评论 #38618598 未加载
masfoobar超过 1 年前
Maybe I am missing something, here.<p>Generally speaking - when you make an HTTP request - you are likely returning:<p>XML &lt;root&gt; &lt;users&gt; &lt;user&gt; &lt;id&gt;1&lt;&#x2F;id&gt; &lt;name&gt;foo&lt;&#x2F;name&gt; &lt;&#x2F;user&gt; &lt;&#x2F;users&gt; &lt;&#x2F;root&gt;<p>[or]<p>JSON { &quot;users&quot;: [{ &quot;id&quot;: 1, &quot;name&quot;: &quot;foo&quot; }] }<p>[or]<p>HTML: &lt;div class=&quot;users&quot;&gt; &lt;div class&quot;user&quot;&gt; &lt;span class=&quot;user-id&quot;&gt;1&lt;&#x2F;span&gt; &lt;span class=&quot;user-name&quot;&gt;foo&lt;&#x2F;span&gt; &lt;button class=&quot;btn btn-small&quot;&gt;edit&lt;&#x2F;button&gt; &lt;&#x2F;div&gt; &lt;&#x2F;div&gt;<p>[When using HTMX, you would add some additional tags. You are still just returning HTML]<p><pre><code> &lt;div class=&quot;users&quot;&gt; &lt;div class&quot;user&quot; hx-target=&quot;this&quot; hx-swap=&quot;outerHTML&quot;&gt; &lt;span class=&quot;user-id&quot;&gt;1&lt;&#x2F;span&gt; &lt;span class=&quot;user-name&quot;&gt;foo&lt;&#x2F;span&gt; &lt;button hx-get=&quot;&#x2F;user&#x2F;1&#x2F;edit&quot; class=&quot;btn btn-small&quot;&gt;edit&lt;&#x2F;button&gt; &lt;&#x2F;div&gt; &lt;&#x2F;div&gt; </code></pre> What makes this anymore (or any less) dangerous? What is the problem?<p>I guess responses is more in line with -- &quot;they tooook our jooooowbs!&quot;<p>From what I read elsewhere. &quot;React creates jobs. HTMX doesn&#x27;t&quot;
moritzwarhier超过 1 年前
Really enjoyed the tangents and the point makes sense. I hate idiotic frontend hate and I am not a fan of htmx, but I still like its approach - if it makes sense for the website.<p>I think every developer who has worked using a CMS using traditional templating + &quot;ajax&quot; has reinvented parts of it at some point in their career. At least I have.<p>If I would find myself in this scenario again, I&#x27;d gladly reach for htmx.<p>Apart from the social media observations, topics tend to be random here, but I like train-of-thought writing.
troupo超过 1 年前
I find all the marketing, advertising intentional or not, around HTMX really obnoxious.<p>Does it have its merits? Maybe? I don&#x27;t know, I can never get past the memes and shit-slinging. Or past them superficially co-opting terms they have nothing to do with like Erlang, or hypermedia.<p>It&#x27;s a toy mascarading as a serious tool.
评论 #38620535 未加载
评论 #38647613 未加载
评论 #38621082 未加载
slj超过 1 年前
The jab at pg referenced in the tweet screenshot’s caption was quite funny
davedx超过 1 年前
It&#x27;s powerful to have your front-end library automagically run code returned by your API, sure.<p>But you can&#x27;t hand-wave the security concerns of that away by ridiculing the people trying to discuss them.<p>There is a fundamental difference between your server returning data versus returning code. If you don&#x27;t want to accept that, fine, it&#x27;s your project, or career, whatever. But if you conduct extensive ad hominems against people (I&#x27;m not a fan of &quot;Devrels&quot; but jeez, that part of this post felt like blatant character assassination) instead of just debating the facts then you&#x27;re a douche and no better than the people you&#x27;re disparaging.<p>I think HTMX is an interesting project that I&#x27;ll probably give a try at some point. But breathless cultish hype of it has already turned me off. I don&#x27;t even know if React got this much attention!?
评论 #38618590 未加载
评论 #38622659 未加载
评论 #38618644 未加载
qwertthrowway超过 1 年前
Also, check out elixirs EEX (a mix of erlang and htmx, in spirit)
gabrieledarrigo超过 1 年前
Lol, I dunno who this dude is, but it was very funny.<p>Ps: Nathan James, pls stop
_dain_超过 1 年前
you know I think this guy doesn&#x27;t like elon musk. just a feeling
评论 #38618829 未加载
nesarkvechnep超过 1 年前
A Erlang, yeah…