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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Progressive Enhancement Makes Me Sad

57 点作者 oliverdunk大约 9 年前

15 条评论

fishtoaster大约 9 年前
This is a weird piece, since it&#x27;s clear by the end that it&#x27;s satire, but he has a few good points (whether he knows it or not):<p>1. &quot;But who’s to say there’s going to <i>be</i> any users?&quot; -&gt; Which is true. If you&#x27;re just starting a project out, you have to decided whether it&#x27;s worth an extra X hours&#x2F;days&#x2F;weeks for any given bit of technical improvement, whether it&#x27;s progressive enhancement or something else. If it expands my potential user base by 10%, but doubles my time to market, it may not be worth it.<p>2. &quot;The less time I spend on creating a robust architecture (boring) the more time I have for creating features.&quot; -&gt; Ignoring the &quot;boring&quot; remark, this is true. I could spend a near infinite amount of time improving my architecture, but at a certain point I reach diminishing returns. Where I cut off my robustness work depends on the nature of the project, but every project has <i>some</i> point at which you&#x27;d improve user experience more by adding a feature than improving performance. For an early prototype, that point may be quite soon.<p>3. &quot;It’s all web apps now&quot; -&gt; I think the author is aware of this, but there <i>are</i> many apps which just don&#x27;t fit particularly well into a document. It&#x27;s not clear whether the author really thinks all such apps are trivial (eg detecting your dog&#x27;s age), but I&#x27;d argue there are plenty of substantial apps that don&#x27;t fit that model well, and benefit substantially from being a full-on js-heavy web app.
评论 #11381974 未加载
评论 #11382515 未加载
评论 #11382653 未加载
评论 #11396947 未加载
rvdm大约 9 年前
To me, the awkward &quot;is this funny or not&quot; approach to writing this article fits in perfectly with the sentiment of the author (and my own) about the subject.<p>In my 18 years as a web dev I&#x27;ve tumbled down every rabbit hole and been caught by every trap ever.<p>We wanted animation? Great, learn some ActionScript. Now you want databases? Add some MySQL and PHP. But then those weren&#x27;t cool anymore and everything had to be RoR and jQuery. Then we ended up writing monsters of jQuery code trying to make sites feature packed and along came Backbone. After that there was Angular, but then people realized SEO and accessibility still need to be considered so now I spend my days writing what should have been as simple as:<p>&lt;h1&gt;Hello World&lt;&#x2F;h1&gt;<p>Like this:<p>React.createElement(<p><pre><code> &#x27;h1&#x27;, {}, &#x27;Hello World&#x27; </code></pre> );<p>So the solution to HTML is now to simply give up on HTML and write everything in JavaScript…<p>I like React, Redux, Node, etc a lot. The fact we can have Universal and Native React and that there finally is a robust solution to most ( all? ) web dev problems is fantastic. But the overhead in development time is significant. When possible I use these tools, but in a lot of cases, I just give up on it all and end up writing straight up HTML divs without any flexboxes or animations or shivs or shims or 5&#x27;s or 3&#x27;s. Just the good old stuff I was writing back in 1998.<p>When comparing web development to something like developing for iOS, this full circle we&#x27;ve made does feel painful ironic. So much so it&#x27;s hard to tell if it&#x27;s funny or not.<p>Small note to the author : love the beautiful big font on your site but you have some colliding elements on iPad portrait.
评论 #11383217 未加载
ebiester大约 9 年前
For the most part, I think people are talking past each other. For sites that are document-based toward a wide audience, progressive enhancement makes the most sense. For application-centric sites (For example, an internal admin app, or a B2B application where SEO and phones aren&#x27;t the primary interface) why would I spend the money for the extra work?<p>It&#x27;s almost as if your use case should determine your strategy.
评论 #11397005 未加载
评论 #11382883 未加载
pmalynin大约 9 年前
We&#x27;ve faced this problem when we were deploying our Meteor application. The issue in particular was mostly for crawlability purposes and Twitter&#x2F;Facebook metadata. The first issue (crawlability) -- which, of course, directly impacts users who cannot run javascript such as search engines [1] -- can be solved trivially by sticking phantomjs in front and redirecting server-side depending on UA. Combined with NGINX&#x27;s caching you can then serve these rendered pages without needing to hit phantomjs every single time. The nice thing is, if you don&#x27;t prune the &quot;script&quot; tags from the rendered pages, you can then just serve these cached pages back to the user. The HTML will be rendered, then if you have JS enabled the Meteor (React | Angular | JSFrameworkOfChoice) it will just re-render the page.<p>[1] I am aware that Google now can run JavaScript, but I&#x27;ve found it to be rather bad and to mangle my pages in quite horrible ways.
jschwartzi大约 9 年前
I completely agree with this post. Most people don&#x27;t realize what a burden it is to write websites that function while taking less than a gigabyte of ram and four cores. You shouldn&#x27;t be browsing the newspaper with a device that&#x27;s older than two years anyway.
评论 #11381999 未加载
hashkb大约 9 年前
I was hoping for good arguments so I could justify laziness but am almost as pleased to have that hope lampooned.
bjterry大约 9 年前
Any additional technical requirements lead to more work (or less quality), and progressive enhancement is obviously a technical requirement. I think this is obvious if you think of even the most basic web interaction: form submission.<p>With progressive enhancement, you have to have one form submission that doesn&#x27;t use AJAX, which means it POSTs to the server and the server accepts the POST and replies with a fully-formed HTML document. Then, because you want to delight your users with animations and a responsive low-latency feel, you have an AJAX version of the form, which posts to the server and receives a JSON response for client-side template rendering. You can share some code between these two, but because rendering the whole page requires completely different data from rendering just the component you are updating, there is a bunch of conditional code.<p>You essentially have to build two models of your application, one on the server side which knows the state of your application (is this modal open, is this widget showing, have they collapsed this widget) and one on the client side that separately maintains all the same state and has transitions between them that will result in identical html. It has to be this way, otherwise your UI is not going to be responsive, animated and delightful for users, and you&#x27;re going to lose in the marketplace. Since you have two models of the state of your app, now you have to make sure they are always in sync. All the testing and bugs and complexity maintaining that dual state could instead be spent on building the next great feature for your users.<p>Now obviously, this is sensitive to context. If you work for a giant enterprise and have more programmers than you know what to do with and clear product requirements set by the market, you can spend the time to build a product that addresses 99% of the users, even if going from 80% to 99% takes 80% more work. But if you are a startup, and you are either racing with competitors to build out the functionality demanded by users, or still exploring the functionality that will see successful adoption of your product, you&#x27;d be crazy to slow yourself down to get every user running NoScript, IE10, or whatever other old browsers. You just need to get your product working for some subset of passionate users, then you can spend more engineering resources on supporting users with older devices once you&#x27;ve proven out the market. Otherwise you may not be around to do so.
评论 #11383023 未加载
cmrx64大约 9 年前
Poe&#x27;s law has struck me down here. Either author is an asshole, or author doesn&#x27;t know how to do good parody.
评论 #11381847 未加载
评论 #11381849 未加载
评论 #11381900 未加载
评论 #11382571 未加载
daigoba66大约 9 年前
&gt; There’s no “document” version of an app that guesses what age your dog is. I mean, what would that even look like?<p>I guess the author doesn&#x27;t realize that code can live on a server. And the answer to his query can simply be a &quot;document&quot;.<p>Edit: I did not catch that the article is supposed to be a joke. If that&#x27;s true... I suppose it&#x27;s not very funny.
评论 #11381810 未加载
chris_wot大约 9 年前
I&#x27;m not really sure why progressive enhancement is considered hard...
评论 #11382585 未加载
jff大约 9 年前
It&#x27;s a little off-topic, but this was one of the few websites where I&#x27;ve had to <i>shrink</i> the text to make it readable. I&#x27;m not complaining, completely the opposite--it just reminded me of an article the other day that said it&#x27;s better to be more accessible by default, and for instance my dad would have probably been pretty happy with the default text size.
zeveb大约 9 年前
Heh, excellent. He really had me there for a moment.
wahsd大约 9 年前
#3 Encourages Bad Behavior ... I was in the middle of Silicon Valley at a hotel that barely had a medium 3G signal and a weak LTE signal in pockets... and that was outside the building facing the bay. If not even SV can muster good signal strength that point is moot.
jhpriestley大约 9 年前
The premise that server-side HTML generation is faster than client-side HTML generation is simply false. See here for experimental confirmation: <a href="http:&#x2F;&#x2F;www.onebigfluke.com&#x2F;2015&#x2F;01&#x2F;experimentally-verified-why-client-side.html" rel="nofollow">http:&#x2F;&#x2F;www.onebigfluke.com&#x2F;2015&#x2F;01&#x2F;experimentally-verified-w...</a><p>Why would offloading computation to a heavily-taxed central server speed anything up? It doesn&#x27;t make much sense. Nor is HTML generation a bottleneck in most realistic applications.
评论 #11382111 未加载
评论 #11383270 未加载
评论 #11383150 未加载
placeybordeaux大约 9 年前
What is up with HN and promoting barely parody pieces?
评论 #11382893 未加载