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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Betting on the Web – Why I Build PWAs

242 点作者 HenrikJoreteg超过 7 年前

30 条评论

jawns超过 7 年前
So it sounds like PWAs now make this true:<p>&gt; You don&#x27;t have to create a native app because PWAs now offer all the functionality of a native app.<p>That&#x27;s cool. But _this_ has been true for a while:<p>&gt; You don&#x27;t have to create a native app because a mobile-friendly website offers all the functionality you need.<p>I use (reluctantly) a bunch of apps that really should be just websites. They don&#x27;t make use of my phone&#x27;s camera or microphone or do anything fancy to my phone&#x27;s user experience. They don&#x27;t need any special permissions, aside from web access. They&#x27;re really just websites in disguise.<p>And yet, for some reason, they&#x27;re apps.<p>Some were even built as websites (e.g. using PhoneGap) and then compiled into native apps.<p>So before we convince people that PWAs are the answer for all of their fancy, highly integrated apps that previously could only be achieved as native apps, I think it&#x27;s going to be an uphill battle just to convince them that in many cases, you don&#x27;t even need an app. You just need a mobile website.
评论 #15219643 未加载
评论 #15221093 未加载
评论 #15220552 未加载
评论 #15219884 未加载
评论 #15220450 未加载
评论 #15226237 未加载
评论 #15219686 未加载
djrogers超过 7 年前
I think one of the uphill battles you&#x27;re going to have to fight with PWAs is end-user habit. If Joe consumer is looking for a great way to see a weather forecast he&#x27;s going to look for an app. Jane wants to play podcasts - she&#x27;s looking for an app. Ezra wants a Jewish calendar - app store.<p>99 times out of a hundred for the smartphone carrying crowd, the app store has become a replacement for google searches when it comes to tools&#x2F;games&#x2F;toys for their slab-o-glass...
评论 #15219782 未加载
评论 #15223857 未加载
评论 #15222307 未加载
csense超过 7 年前
I&#x27;m really sick and tired of going to a site on my phone, and getting inundated with popups and banners and crap telling me to install the app (Reddit, I&#x27;m looking at you).<p>I just want to view the same fricking website that I view on my desktop, but on my phone. You&#x27;d think that would be a simple and obvious way of working that would be supported by every single website in existence without any special effort on the part of web developers. And you&#x27;d be right, except web developers these days GO OUT OF THEIR WAY TO MAKE IT NOT WORK THAT WAY.<p>You&#x27;d think the simple and obvious fact, that phones these days generally have web browsers just as capable as desktop browsers, would have penetrated people&#x27;s thick skulls by now. But for some reason everyone wants their own app, I darkly suspect so they can use the email, contacts, camera, microphone etc. for God knows what creepy spying and data harvesting purposes.<p>So if this guy&#x27;s figured out that the way to convince The Powers That Be, who&#x27;ve already been convinced by someone else that You Need To Have An App Even If The App Is Literally The Same As Your Website, that it&#x27;s actually okay to Not Have An App And Just Have People On Your Phones Go To Your Website, by simply re-naming your website from &quot;a website&quot; to &quot;a Progressive Web Application,&quot; more power to him.<p>Me, I just want to look at websites, and occasionally look at them on my phone, and I&#x27;d like a web that allows me to have the experience I&#x27;m used to from my desktop, on my phone.
评论 #15220669 未加载
评论 #15220693 未加载
dehef超过 7 年前
Just be aware that ionic3 is full of bugs. You can use angular 4 which is absolutely ready now. Ionic is full of promises (literally and figuratively), but it is not even ready as a beta.<p>- I spent days to make workaround for making it work. Even basic things like routers.<p>- I suffered a lot with its build process. Transpiling my typescript is a so much pain for my mac. That is even worse than when I compiled java years ago.<p>- The need to wait 2 minutes for the live reload (when it actually reloads the change like expected) is a big loss for the web development process.<p>Anyway for me the point is totally true. I was only on natives and now only what you call &quot;PWA&quot;
评论 #15220252 未加载
评论 #15221455 未加载
评论 #15220678 未加载
millstone超过 7 年前
&gt; It is now possible to build PWAs that are indistinguishable from their native counter parts<p>It&#x27;s not now possible, but even if it were, it would only be because the native app does not in fact use native components.<p>The Starbucks app already doesn&#x27;t feel native, with its custom casing, fonts, navigation and behaviors.
评论 #15221786 未加载
joshdance超过 7 年前
PWA = progressive web app. Took me a while to figure out what that acronym was. <a href="https:&#x2F;&#x2F;pwa.rocks&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pwa.rocks&#x2F;</a>
评论 #15222633 未加载
评论 #15222133 未加载
criddell超过 7 年前
The author spends some time talking about platform stability as a big part of why web apps are great. But for web apps, is the platform actually stable?<p>I run some applications on my PC that are older than the iPhone and they work just fine. Will the Starbucks web app still work a decade from now? Is any non-trivial web app ever actually <i>done</i>?
评论 #15219675 未加载
评论 #15219566 未加载
评论 #15219619 未加载
评论 #15219654 未加载
bcarroll22超过 7 年前
Here&#x27;s what I&#x27;ve realized lately. Our product is for teachers (K-6 mostly) who tend to not be very techy. They use phones, tablets, etc. to the extent that they need to. We spent TONS of time optimizing our website for mobile. At one point it was a PWA that was very optimized and had like a 95 lighthouse score (not anymore because of finicky SW behavior). They didn&#x27;t care one bit. Like, not even one little bit. To them, it was annoying that it wasn&#x27;t &quot;an app&quot;.<p>I don&#x27;t think this battle is one of &quot;build good enough mobile web experiences&quot;, it&#x27;s more &quot;convince non-techy users that a good mobile web experience is good enough for you in x% of cases.&quot; For us who read HN, we&#x27;re jaded on apps, installs, 100mb of storage wasted. For the less techy world, they don&#x27;t feel the pain we do, and that will continue to be a problem.
评论 #15222908 未加载
katelynsills超过 7 年前
I&#x27;ve been experimenting with turning a work application into a PWA, but ran into a problem - all the stuff that would be great to cache was behind an authentication wall. None of the PWA examples covered this. Also, the service worker examples all had &quot;Don&#x27;t use this in production&quot; warnings. :D
评论 #15226217 未加载
somehnreader超过 7 年前
I had to CTRL+F through the article to learn that PWA == &quot;Progressive Web App&quot;.<p>Am I missing a trend?
评论 #15219646 未加载
otakucode超过 7 年前
Deciding to bet on the web is fine, but shouldn&#x27;t the immediate next thought be like &#x27;wait, why did the web win?&#x27; I think that&#x27;s a far more interesting topic. It would be hard to argue that it didn&#x27;t win, and it certainly wouldn&#x27;t have been easy to see it coming. Someone designed a system for static hyperlinked document presentation... then years later others start shoehorning in broken bits of application-like functionality... years more along, the shoehorning continued with vigorous earnest, subverting every attempt by the W3C to prevent the web from turning into an application platform and remain a static document presentation system.<p>With so many hurdles to cross, so many things holding it back, why on earth did it win? Clearly not just because it was cross-platform, lots of things did that. Certainly not because it followed any even REMOTE sense of reasonable development. Remember when people used to talk about the utility of standard user interface widgets? I imagine all those people are dead now.<p>Personally I think it was the ability to search. That trumped absolutely every single other consideration across the board. What users wanted was to vaguely indicate what they wanted and be using that application moments later. There&#x27;s no reason that HAS to be only how the web works, but it mostly is now. If something comes around that enables that elsewise... maybe consider putting a chip down on that as well.
评论 #15222300 未加载
osrec超过 7 年前
This is something I feel quite strongly about, and I too favour PWAs. I think native apps have their place for now, as a few key APIs are not fully exposed via browsers yet, but the API landscape continues to improve. Apple has even started dev on service workers for Safari, and their IndexedDB implementation is not as buggy as it used to be.<p>If I&#x27;m honest, apps never really made sense to me; they seem to be part of an intrinsically closed eco-system, which feels completely at odds with the initial premise of the internet, and dare I say, computing in general. If you have an Apple product, you must go to the App Store, if you have an Android product, then it&#x27;s the Play Store etc. The feeling of openness that I became accustomed to (probably from a time before &quot;apps&quot;) seems to have taken a step backward with mobile apps, and replaced with an endless need for vendor lock in. It&#x27;s great for business, but as a user, it feels really restrictive. As a developer, it&#x27;s not great either.<p>I believe that as browsers become more standardised (i.e. you don&#x27;t need rubbish like if(IS_IOS) { ... } else { ... } in your JavaScript), and they start to expose more and more functionality via well-defined APIs, developers will favour the browser as a deployment platform, simply because it&#x27;ll be more ubuquitous, will be easier to deploy and manage, and will have a lower barrier to entry. Till then, native apps will maintain their position, as they will be the more polished product.<p>A personal anecdote: I gave my latest app (a PWA - <a href="https:&#x2F;&#x2F;usebx.com" rel="nofollow">https:&#x2F;&#x2F;usebx.com</a>) to a few small business owners in my home town to use for free. I pointed them to the website, and the first question they asked me was &quot;why can&#x27;t I find it on the app&#x2F;play store?&quot;. I told them that they needn&#x27;t go to the app store - just add the webpage to your homescreen, and you&#x27;re good to go! They much preferred that method, as compared to &quot;faffing around on t&#x27;app store&quot; (imagine that said in a Yorkshire accent)! They even loved the app, and as far as I&#x27;m aware, found it on par with a native app. My point is, even the fairly long winded process of searching the app store to find an app, then waiting for it to install, was the first thing that came to mind for these non-techy guys. Once they knew about &quot;Add to homescreen&quot;, they liked it. I think much of the transition to PWAs will be like this - people struggling free from their habitual need to use vendor specific app stores and eventually embracing the simpler, more open, web-based app paradigm.
评论 #15223539 未加载
评论 #15226979 未加载
norea-armozel超过 7 年前
I&#x27;m not sure I understand the motive behind progressive web apps. Some apps I can see being web-only. But apps that require extensive storage, low latency, and much more traditional computing resources isn&#x27;t going to work in the mold of a PWA. A calendar, a chat room, or some games I can see fitting the PWA mold automatically. But like I said, PWA to me isn&#x27;t a universal replacement for good native app development. It fits many lightweight problems but anything else that better fits native should stay native. I really wish web developers would acknowledge this much and stop trying to say &quot;why can&#x27;t you make that a web app?&quot;
ntaso超过 7 年前
I want PWAs to succeed, because I would love to publish close-to-native apps without an app store. I think PWAs are a great thing for the open web. However, hyping PWAs with unrealistic expectations doesn&#x27;t do any good. The Ionic team talks in the same vein. I like Ionic, I don&#x27;t like hype. Here are a few reasons why PWAs aren&#x27;t there yet and probably won&#x27;t replace most apps in the near future:<p>- No native APIs. Yeah sure, you can order a coffee at Starbucks, but the underyling hardware isn&#x27;t exposed to JS. You won&#x27;t be able to make a camera app with PWAs.<p>- Input controls suck. Same as with every mobile browser and every Cordova-based app: You cannot control how the keyboard behaves and I suspect that it&#x27;s not even in Apple&#x27;s interest to make Mobile Safari super-great. Sure, they&#x27;re working on PWAs, but that doesn&#x27;t mean anything. Just see how bad Mobile Safari&#x27;s &lt;select&gt; looks like. Or bugs in multi-selects that have been there forever.<p>- They still run in a browser. It shows an address bar and whatever else your browser is always showing. Try Twitter&#x27;s PWA right now: <a href="https:&#x2F;&#x2F;lite.twitter.com" rel="nofollow">https:&#x2F;&#x2F;lite.twitter.com</a> It&#x27;s way too easy to accidentally swipe back. And then, Twitter being a shitty Single-Page-App, the browser loses its scroll position.<p>- PWAs suffer from the same problems like all SPAs [1]<p>And finally:<p>- A PWA is just a proxy to download and cache responses from a server. It enables offline support (kinda) for single-page apps. It&#x27;s not a magical something. The problem is that most users go to the App or Play Store first (like djrogers pointed out here: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15219682" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15219682</a>). They COULD be using PWAs – or at least good mobile webistes – right now, but they aren&#x27;t.<p>I think PWAs will find their places and I&#x27;m betting on them, too, to a certain extend. But over-hyping PWAs without addressing these issues is just naive.<p>[1]: Great read on this topic: <a href="https:&#x2F;&#x2F;adamsilver.io&#x2F;articles&#x2F;the-disadvantages-of-single-page-applications&#x2F;" rel="nofollow">https:&#x2F;&#x2F;adamsilver.io&#x2F;articles&#x2F;the-disadvantages-of-single-p...</a>
评论 #15221973 未加载
评论 #15221625 未加载
hutzlibu超过 7 年前
&quot;4. PWAs everywhere&quot;<p>Yeah, yeah, I read that many times while I researched about it. But everywhere seams to mean today, everywhere except for the old-school Desktop (!)<p>I mean I understand, that the implementation and development of a new standard takes time and since mobile is hip, everyone focus there first. Makes sense. But I feel a bit ridicouled(and annoyed) with all the PWA, don&#x27;t worry about plattform talk - and then there are no signs at all, that the traditional desktop is a target in the near future, if it is at all. At least I could not find further informations.<p><a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;Manifest" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;Manifest</a><p>And I am building a webapp, which does a bit more than turning on a lightbulb, so I also like it to run on a real PC. To work with it. With a screen and keyboard - and yes, whenever I want, easily switch to mobile and still be able to work with it, ... this is what would make me excited. True plattform-independence, where I don&#x27;t have to worry about clumsy plattform details. What I have to worry about is adjusting to the screensize, etc. and if there is a keyboard, mouse, gps, device orientation, battery maybe(so the app knows to save urgent data, before, the power goes off), pressure sensitive pen, multitouch, etc. etc.<p>I&#x27;d like to have all this information and then present the user the best UI I can master with the given conditions and don&#x27;t worry what happens behind the scene.<p>I just target the WebAPI&#x27;s.<p>And they get more and more powerful. Mozilla tried to build and market their OS around them, which failed comercially, but helped the basic idea a lot. And this basic idea I like because of the simplicity. So I am excited and looking forward for further improvements ... but please don&#x27;t forget the desktop as a plattform!
sotojuan超过 7 年前
I think buildings sites as PWAs is a good idea but it&#x27;ll take some time for them to actually replace apps. As other commenters have said, user habits go straight to apps. And until Apple decides to support service worker in iOS Safari, it won&#x27;t have the same functionality as on Android.
评论 #15221201 未加载
bb_dogg超过 7 年前
&quot;With the original iPhone, there was no App Store, and no third party apps. At least not at first...&quot;<p><a href="https:&#x2F;&#x2F;www.imore.com&#x2F;history-app-store-year-zero" rel="nofollow">https:&#x2F;&#x2F;www.imore.com&#x2F;history-app-store-year-zero</a><p>I think this section sums it up well why there became a demand for apps, and the points are still valid today.<p>&quot;But back then, the limitations of web apps, their lack of access to core functionality, their relatively poor performance compared to native apps, and the difficulties involved in charging for them proved to be insurmountable problems.<p>As a solution, web apps were more sour than sweet.&quot;
HillaryBriss超过 7 年前
the author doesn&#x27;t seem to discuss Android&#x27;s &quot;instant app&quot; feature <a href="https:&#x2F;&#x2F;developer.android.com&#x2F;topic&#x2F;instant-apps&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;developer.android.com&#x2F;topic&#x2F;instant-apps&#x2F;index.html</a><p><i>Android Instant Apps allows Android users to run your apps instantly, without installation</i>
wheresvic1超过 7 年前
This is pretty cool and was actually my reasoning behind creating my side project as a PWA.<p>It&#x27;s a gym workout logging app and you can try the UI without needing an account -&gt; <a href="https:&#x2F;&#x2F;ewol.fitness" rel="nofollow">https:&#x2F;&#x2F;ewol.fitness</a>
woranl超过 7 年前
I sure hope history will repeat itself. Just like Desktop, web apps are taking over. Hopefully, PWAs will do the same in mobile.<p>No one wants to install&#x2F;update apps anymore. They are not exciting. They are chore.
fredsted超过 7 年前
PWA = Progressive Web Apps
_noqo超过 7 年前
It&#x27;s possible to sell a PWA like sell a $5 app on the App Store&#x2F;Play Store? The author doesn&#x27;t address this topic and it&#x27;s important to make a transition imho.
评论 #15221815 未加载
galfarragem超过 7 年前
This is the most congruent argument advocating web apps and indirectly the most clear career advice that I&#x27;ve read for a long time.<p>A sincere thank you.
ernsheong超过 7 年前
I don&#x27;t think writing a web extension thingy on Safari&#x2F;Chrome mobile can be achieved with a PWA. Would love to be corrected.
halfnibble超过 7 年前
Thank you SO MUCH!!<p>Speaking of BlackBerry, I now have a functional Starbucks app on my BlackBerry10 phone (and not a laggy Android sideload).<p>You rock.
unkown-unknowns超过 7 年前
I&#x27;d not heard of PWA before. After reading the OP I did an additional search on Google. Found a course on udemy that claims to be on sale.<p><a href="https:&#x2F;&#x2F;www.udemy.com&#x2F;progressive-web-app-pwa-the-complete-guide" rel="nofollow">https:&#x2F;&#x2F;www.udemy.com&#x2F;progressive-web-app-pwa-the-complete-g...</a><p>I&#x27;ve seen three of the videos in it so far. Seems like an ok course for the ~25 USD I paid for it.
dmitriid超过 7 年前
&gt; You don&#x27;t have to create a native app because PWAs now offer all the functionality of a native app<p>This is a blatant lie<p>&gt; Starbucks PWA: ~600KB<p>2.1 MB just the initial page, with no cards. The preview.js file is 751 K<p>I do agree, however, that it&#x27;s much smaller than an iOS app.
评论 #15220229 未加载
评论 #15220152 未加载
shams93超过 7 年前
Apple is the only problem they keep dragging their feet on modern web features to try to force developers into native iOS
评论 #15221546 未加载
EGreg超过 7 年前
Android&#x27;s answer to this guy&#x27;s &quot;app for this right now&quot; thing:<p><a href="https:&#x2F;&#x2F;www.theregister.co.uk&#x2F;AMP&#x2F;2017&#x2F;01&#x2F;25&#x2F;google_testing_android_instant_apps&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.theregister.co.uk&#x2F;AMP&#x2F;2017&#x2F;01&#x2F;25&#x2F;google_testing_...</a>
tjoff超过 7 年前
So, a PWA is a massively bloated web page? Yeah, that is exactly the kind of thing I want to run on a browser in my phone.<p>Sure, a decade with Moore and it might actually become usable - but do we really want to set the bar that low?<p>Installing an app is cumbersome, but when going to his example I&#x27;m forced to create an account just to see what it is.