Betting on the Web – Why I Build PWAs
joreteg.com
joreteg.com
> You don't have to create a native app because PWAs now offer all the functionality of a native app.
That's cool. But _this_ has been true for a while:
> You don't have to create a native app because a mobile-friendly website offers all the functionality you need.
I use (reluctantly) a bunch of apps that really should be just websites. They don't make use of my phone's camera or microphone or do anything fancy to my phone's user experience. They don't need any special permissions, aside from web access. They're really just websites in disguise.
And yet, for some reason, they're apps.
Some were even built as websites (e.g. using PhoneGap) and then compiled into native apps.
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's going to be an uphill battle just to convince them that in many cases, you don't even need an app. You just need a mobile website.
In fact, I really wish Google Maps did this, but I guess the damage of getting it wrong once is far greater than getting it right 100 times.
Phones are pretty powerful with huge storage. If you can compute directions offline, why not buses? Saving a map or route is tiny compared to the 64, 128, or 256 GB storage on most people's devices, surely bus schedules can't be that big.
Either way, a lot of complexity / resources spent on something trivially solved by the original solution (webpage).
- static data often is sharing using the "GTFS" specification, which includes stop locations, route geometries, scheduled trips, etc. See http://gtfs.org/
- real-time data is shared using a variety of specifications, and typically includes vehicle locations, service alerts, and other notifications from the agency
The static kind of data can certainly be cached for local use. Try browsing and downloading some from the Transitland open transit data platform and its API: https://transit.land
That's ridiculous argument against offline use - bus schedules are small enough data that we print them out and carry them in our pockets.
Sure, if the bus company socks, it might be nice to know about changes due to roadwork, real-time updates (ie look up the next bus via it's gps location and speed) - but doing off-line route planning would be a great feature...
I'm pretty sure that's common functionality.
(To be honest, the Mountain Line is very punctual, so I could likely do just fine with just a printed schedule.)
Fun aside: my dad drove for the Mountain Line many years ago. I rescued one of his 1970s yellow shirts with the embroidered logo patch a while back.
I mean, I get the usefulness of wilderness-related apps (e.g. ocean fishing) or various things that could be useful in an emergency like the aftermath of a hurricane, and for these offline functionality matters, but for buses, if you're within a few miles of a bus stop and the buses are running at all, then you're guaranteed to have high-speed cellular internet access and offline features don't matter.
I can imagine being in the middle of some national park where the closest bus is unimaginably far away but I still have mobile internet access, but I really can't imagine a situation where I'd care about buses but don't have internet. Or are USA data plans so small that it's worth thinking about the data usage (as opposed to just latency) of downloading a webpage with timetables?
This just isn't the case in the United States. There are large swaths of the country that straight up don't have high speed internet in any form.
edit: /apps/lookup
If I, the user, switch from the when-is-the-next-bus-coming app to another app and then switch back (within, say, a few minutes), it'd be really great if the app could default to showing me info based on the data it just downloaded instead of automatically resetting the UI and waiting to update it until it downloads the data again.
Well, the author straw-mans that web apps are smaller. Yes, web apps are lighter than equivalent native apps. But not to anywhere near the degree described in the article.
There's no legitimate reason for the Starbucks app to be 100MB. None. A native Android app equivalent to the PWA in the article would come in at about about 2MB, for instance.
Starbucks app is huge because they stuffed it with something (same for Twitter, Facebook, etc). Starbucks new PWA is clean and light because it hasn't (yet) been stuffed with the equivalent junk. It's not a technology difference, it's a political/corporate one.
but, isn't it a lot less expensive to build and maintain a mobile website than to build apps for both iOS and android? wouldn't that win the argument in a lot of cases?
I didn't think you could do arbitrary network or disk I/O. The sandbox is really, really nice for many applications, but PWAs aren't suitable for all native applications.
For the curious: https://developers.google.com/web/fundamentals/instant-and-o...
Edit: I have seen some browser demos that could show your phone's orientation. In the past the camera trigger was not reliable that was in 2013-2014 if I recall dang time flies.
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/games/toys for their slab-o-glass...
It's not that far of a leap to think they'll be added to the app store.
The Windows Store has supported server-hosted web apps [1] for some time now, and provides a large subsection of the platform-specific libraries to hosted web apps. Hosted Web Apps are based on earlier drafts of PWA standards, but the expectation from BUILD and other Microsoft talks is that they will bring platform-specific libraries along for the ride as the converge to more recent PWA standards.
[1] https://developer.microsoft.com/en-us/windows/bridges/hosted...
For instance, how often do you try to get a desktop app for something instead of a Google search? Does anyone start by browsing the Mac App Store?
Related: http://www.kalzumeus.com/2009/09/05/desktop-aps-versus-web-a...
https://www.recode.net/2016/9/16/12933780/average-app-downlo...
Keep in mind this is in the US. People in developing countries, on older and slower devices with limited bandwidth, are even less likely to download new apps.
The reality in developing countries is actually completely opposite. People in those countries love apps and use WiFi etc. to downlod them in coffee shops/schools/offices... so they can keep using the service only by downloading the minimalistic json instead of downloading whole service with UI/GFX etc. each time they need it.
I tried using some of those PWA now online and they do work better than traditional webapps, however they are still slightly laggish and have unfinished feeling when compared to native apps.
PWA is going to be almost certain flop. It's trying to do almost same what React Native has already done but with PWA you have to convince the users to switch from the secure, trusted, well working apps to "inferior and unsure webapps" and from just pressing the app icon back to the old school "open browser, select address bar, enter address, press enter"-hassle. Changing this mentality that people have build for almost 10 years now is probably going to be as easy as to make Trump change his opinion about the wall.
I just want to view the same fricking website that I view on my desktop, but on my phone. You'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'd be right, except web developers these days GO OUT OF THEIR WAY TO MAKE IT NOT WORK THAT WAY.
You'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'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.
So if this guy's figured out that the way to convince The Powers That Be, who'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'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 "a website" to "a Progressive Web Application," more power to him.
Me, I just want to look at websites, and occasionally look at them on my phone, and I'd like a web that allows me to have the experience I'm used to from my desktop, on my phone.
I mean, do you want the app so you can have an app, or do you want the app so you can make a purchase? I don't understand.
At some point, I gave up. If apps is what people want, I make apps. After a looong process of deciding between native and hybrid (build with Ionic), I finally settled on Ionic. The result is actually quite okay. People love it. I can maintain two platforms with a single code base and will probably rewrite parts of the web app with Node so that I can share core code between 3 platforms.
How all of this will turn out in the long run, I don't know. Maybe I'll outsource app development at some point again in the future, now that I have a working product that is exactly as I want it to be.
Seriously, consider releasing a Cordova-based app. Slap some functionality on top so that it won't be rejected by Apple (Website-only wrappers aren't allowed). Maybe an offline storage or whatnot. This shouldn't take too much effort and you might be surprised that new customers find their way to your business.
As for security, you don't have to grant permissions. All apps are also put through a scanning process.
For portability the browser wins. For quality well crafted apps prevail.
- I spent days to make workaround for making it work. Even basic things like routers.
- 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.
- 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.
Anyway for me the point is totally true. I was only on natives and now only what you call "PWA"
I don't mean to flame, I just want to provide a counter example as I was using Ionic on the day to day basis for about 5 months.
- I find the router to be very easy to use, requiring no work arounds, you call the nav controller and push / set a view, nothing crazy here.
- The build process, specifically for the TypeScript? Are you using the CLI? There's just about nothing you need to do
-I was able to start fresh on a mac and have everything up and running for both Android and iOS within 2 hours (this is mostly installing the Android SDKS).
- And the live reloading will reload your entire app within 20 seconds, and this was on a pretty large Banking application using most of the plugins that are available (Camera, fingerprint, maps, etc etc etc).
Note that this is all done through using the Ionic CLI, which really eases the development process. I personally wouldn't try it without the CLI.
When I only update scss that is very quick indeed. The start process is very quick also.
For the router, things have became messy when I tried nested ion-nav. A method is deprecated (getRootNav) and the new is not even ready to use! (getRootNavById)
I post many issues on github. Still using ionic router (no other choices now, but by using tricks like events), and ionic cli for building, some buttons also, and I avoid anything else.
ion-menu was too buggy on ios, I had to make a menu by myself
The general quality on ios is very poor
Some plugins are great but I have bizarre issues... Keyboard plugin for exemple, I had to "ngZone" it to make it work.
Using the grid was too verbose and too buggy also. I design everything in flexbox now. It fells that ionic is trying to build a good WYSIWYGs editor with ionic creator but making developpers "beta-testing" their frameworks (sorry to complain after a open source project)
As far as live reload goes, it definitely is faster than 1 minute, are you connected via USB? For live reload I would stay connected via USB and then obviously you need to be on the same Wi-Fi, (For iOS, I've only used the simulator for development, but we test on a real iPhone all the time)
What kind of issues are you having with the menu? The only bugs that I've found had to do with animations, I had to use CSS animations as opposed to the Angular way of doing animations for iOS.
Other than that though, I've found the iOS to be the most stable version of the application, even though I developed it almost exclusively on Android (with some spurts on iOS to ensure everything worked).
As for the router, yeah I see what you're saying, our app is pretty straight forward as far as navigation goes.
The grid, I agree, it's annoying, it's like they threw bootstrap grid system and flexbox into one, and it's a bit strange.
I've always entertained the idea of using a hybrid framework--like Ionic--but I have never heard of a successful business betting the farm on one (especially a "Banking" one like you say).
https://play.google.com/store/apps/details?id=com.nexs.NexsC...
- Router? What's wrong with it?
- Build process? `npm install` then `ionic serve`. I think that's it.
- Live reload and building my app became much faster during the last months. It takes probably 5-8 seconds today
It's not now possible, but even if it were, it would only be because the native app does not in fact use native components.
The Starbucks app already doesn't feel native, with its custom casing, fonts, navigation and behaviors.
For that matter, what does a native android app look like? I've never seen any consistency between apps at all, let alone the sort of consistency you can get with gnome, KDE or older windows.
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 done?
The site is actually older than that -- it started around 2004 I think.
So even poorly written web apps have longevity sometimes, even when you don't intentionally design for logevity.
So, the oldest code I wrote that's still running is a bunch of web stuff.
Web apps being "done/not-done" is a different question altogether, and it depends on the ever-changing goals of the app/business behind it.
I don't think this battle is one of "build good enough mobile web experiences", it's more "convince non-techy users that a good mobile web experience is good enough for you in x% of cases." For us who read HN, we're jaded on apps, installs, 100mb of storage wasted. For the less techy world, they don't feel the pain we do, and that will continue to be a problem.
All in all, it depends hugely on the functionalities your app/web provides, and whether you can build an experience that is app-like enough or not...
Am I missing a trend?
https://en.wikipedia.org/w/index.php?title=Progressive_web_a...
This article gives a solid overview: https://alistapart.com/article/yes-that-web-project-should-b...
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.
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'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.
From a user perspective, being able to instantly download any "app" you need (i.e. visit a website) has been the logical conclusion of high speed mobile data. It's low investment, takes up a miniscule amount of ephemeral storage, and works on anything.
From a developer perspective, you can be assured that your single codebase will run on virtually any device, with minimal adaptations to it. You have enough performance to run mildly resource intensive 3D games, some basic concurrency, and an ecosystem that fixes all of the most important faults in the language (typescript is the biggest one IMO). You also increasingly have APIs that allow you to do everything that you could otherwise do with a proper desktop/mobile app.
Literally the ONLY reason webapps are not the first choice for most companies is because they're not as sticky (obnoxious). Users aren't forced to look at your icon and receive your notifications until they disable them. That's it.
There's no reason a similar system couldn't be built to deliver platform-native applications that run with full access to data you control and which call out to corporate servers only for situations where those corporations are going to provide actual VALUE that couldn't be had locally couldn't be made. It just hasn't been.
I'm very into the idea of HTML/CSS/JS on the desktop (and by extension, things like react native), even if simply as a frontend to a heavier duty application running on localhost. I feel like the OSs should be shipping runtimes for it instead of having insane 120MB hello world electron apps.
Web apps also don't necessarily mean someone else has control over your data -- it is technically easier to determine whether they do. You can inspect web requests in your browser, you can't in most native apps. There are plenty of silly things like Dark Souls stat calculators that make so much more sense as a webapp, and are 100% client side.
Well, Windows does come with the MSHTML control. Sadly for some reason they decided to version lock it at IE6 instead of keeping it up to date for applications to use.
Why? there are better languages, platforms and layout engines. HTML/CSS/JS was meant to be a document markup sharing platform, not a rich application one. Use the best tool for the job.
These are intertwined with the language and GTK especially does not look attractive on macOS and Windows.
The appeal to HTML/CSS/JS is it's 100% agnostic to the platform, and can even be used as a front-end to a program written in a different language.
If I'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's the Play Store etc. The feeling of openness that I became accustomed to (probably from a time before "apps") seems to have taken a step backward with mobile apps, and replaced with an endless need for vendor lock in. It's great for business, but as a user, it feels really restrictive. As a developer, it's not great either.
I believe that as browsers become more standardised (i.e. you don'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'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.
A personal anecdote: I gave my latest app (a PWA - https://usebx.com) 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 "why can't I find it on the app/play store?". I told them that they needn't go to the app store - just add the webpage to your homescreen, and you're good to go! They much preferred that method, as compared to "faffing around on t'app store" (imagine that said in a Yorkshire accent)! They even loved the app, and as far as I'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 "Add to homescreen", 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.
But isn't using a web app that stores its data to a remote server and handles upgrades a method of vendor (in this case developer) lock in? As a user you are 100% reliant on the developer, both for your data but also in their mercy when it comes to upgrades (imagine developers changing how their UI works to a way you dislike - my aunt every now and then calls me because something went wrong but what really went wrong was Google making slight changes to Gmail or the Google home page that confused her - or, even worse, starting to require more resources than your computer can handle but you cannot do something as simple - with native apps - as to just keep using the older version).
I agree about the gatekeeperness aspect of app stores too :-). At least with Android there is the ability to install APK files, though it isn't very user friendly.
- No native APIs. Yeah sure, you can order a coffee at Starbucks, but the underyling hardware isn't exposed to JS. You won't be able to make a camera app with PWAs.
- 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's not even in Apple's interest to make Mobile Safari super-great. Sure, they're working on PWAs, but that doesn't mean anything. Just see how bad Mobile Safari's <select> looks like. Or bugs in multi-selects that have been there forever.
- They still run in a browser. It shows an address bar and whatever else your browser is always showing. Try Twitter's PWA right now: https://lite.twitter.com It's way too easy to accidentally swipe back. And then, Twitter being a shitty Single-Page-App, the browser loses its scroll position.
- PWAs suffer from the same problems like all SPAs [1]
And finally:
- A PWA is just a proxy to download and cache responses from a server. It enables offline support (kinda) for single-page apps. It's not a magical something. The problem is that most users go to the App or Play Store first (like djrogers pointed out here: https://news.ycombinator.com/item?id=15219682). They COULD be using PWAs – or at least good mobile webistes – right now, but they aren't.
I think PWAs will find their places and I'm betting on them, too, to a certain extend. But over-hyping PWAs without addressing these issues is just naive.
[1]: Great read on this topic: https://adamsilver.io/articles/the-disadvantages-of-single-p...
The only reason I can think of is that Apple intentionally keeps the mobile experience slightly crappy so that people perceive native apps having higher quality.
Of all companies, Apple should be the one with the best usability in a browser, no? But hardly so.
Android doesn't show the address bar. I don't have iOS but it seems like Safari support for PWA isn't as far along as Chrome.
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 (!)
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'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.
https://developer.mozilla.org/en-US/docs/Web/Manifest
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'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.
I'd like to have all this information and then present the user the best UI I can master with the given conditions and don't worry what happens behind the scene.
I just target the WebAPI's.
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't forget the desktop as a plattform!
https://www.imore.com/history-app-store-year-zero
I think this section sums it up well why there became a demand for apps, and the points are still valid today.
"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.
As a solution, web apps were more sour than sweet."
Android Instant Apps allows Android users to run your apps instantly, without installation
It's a gym workout logging app and you can try the UI without needing an account -> https://ewol.fitness
No one wants to install/update apps anymore. They are not exciting. They are chore.
A sincere thank you.
Speaking of BlackBerry, I now have a functional Starbucks app on my BlackBerry10 phone (and not a laggy Android sideload).
You rock.
https://www.udemy.com/progressive-web-app-pwa-the-complete-g...
I've seen three of the videos in it so far. Seems like an ok course for the ~25 USD I paid for it.
This is a blatant lie
> Starbucks PWA: ~600KB
2.1 MB just the initial page, with no cards. The preview.js file is 751 K
I do agree, however, that it's much smaller than an iOS app.
650 KB for me: https://i.imgur.com/eVoZtWQ.png
vendor.js 614 KB
https://www.theregister.co.uk/AMP/2017/01/25/google_testing_...
Sure, a decade with Moore and it might actually become usable - but do we really want to set the bar that low?
Installing an app is cumbersome, but when going to his example I'm forced to create an account just to see what it is.