Live data from Hacker News

Tiny PWAs and why I keep building them

justinribeiro.com

161–170 of 178 posts

Re: Tiny PWAs and why I keep building them

#161

When I first heard someone talking about "Progressive Web Apps" I thought they were talking about "Progressive Enhancement" [1]. Turns out doing a PWA is just basically about using the "Service Workers" API [2] and the practices around that. This nice article does a lengthy trace on the origins of the "PWA" term [3]. The same guy that started the "Service Workers" spec in Github [4] created the PWA marketing campaign…

I work on the same team (Web DevRel) as the "service worker guy" you mention (Jake Archibald). Alex Russell (who introduced the "PWA" and is now advocating for the "Never-Slow Mode" idea you may have heard about recently) works on Chrome but collaborates with us frequently.

> When I first heard someone talking about "Progressive Web Apps" I thought they were talking about "Progressive Enhancement"

Progressive enhancement is indeed where the P in PWA comes from. The core idea is to ship great sites for all users, and progressively upgrade with the latest web capabilities (service workers for offline, manifest for adding to homescreen and full-screen displays, and so on) when a user's device supports it. If the user's device doesn't support it, they should still get a good, traditional web experience: fast, secure, usable.

> Turns out doing a PWA is just basically about using the "Service Workers" API [2] and the practices around that.

Your first impression about progressive enhancement was closer to the mark. The PWA Checklist [1] is the canonical document about what constitutes a PWA. We created that doc in November 2016 [2] to try to clear up the massive confusion about the definition of a PWA, but apparently to no avail.

Under the "Baseline PWA" checklist you'll notice that there's mention of service workers and manifest files, but there's also mention of loading fast on 3G, having mobile-friendly design, being secure, supporting all browsers, and so on. Again, the core idea is to ship good experiences for all users, and progressively enhance the UX when possible.

It'd be an interesting postmortem to study why the "PWA" term has been so notoriously confusing. IMO part of the problem was that we as a team weren't 100% crystal-clear on the definition at the start. But to be fair, I think we did straighten out our messaging pretty early on. The PWA Checklist that I linked to which has been out since November 2016 is evidence of this. But by that time it was already too late. PWA became a buzzword, and the blogging community seemed to conflate "PWA" with "promising new web platform capabilities" (service workers and manifests). I don't mean to shift blame. We (Web DevRel) most likely caused that conflation. I think the takeaway is that this is a lesson on what can happen when you're not 100% clear on messaging right from the start.

[1] https://developers.google.com/web/progressive-web-apps/check...

[2] https://github.com/google/WebFundamentals/commits/master/src...

Re: Tiny PWAs and why I keep building them

#162

There are only two real things limiting PWAs in my opinion: 1. Lack of support on iOS. I presume it’ll stay this way for a while (years!). Mobile Safari finally has service workers, but really, that’s about it. No support for “Add to Home Screen” (technically it’s there, but doesn’t work the way it does in other browsers), and a lot of other APIs. 2. The Web is missing some APIs that would really let it compete with…

For 2, this is the one I'm most looking forward to: https://developers.google.com/web/updates/2018/11/writable-f... Entire classes of PWAs are essentially impossible to build right now because of the lack of ability to work with files directly, think offline editors, offline music players, etc.

FileWriter API existed in Chrome for a long time, but all attempts to push it mainstream failed due to Mozilla. I am curious if the latest attempt gets political backing from all members of W3C. Otherwise PWAs will stay pretty limited for toy apps; with WebAssembly and random local file access they could replace many desktop apps.

Re: Tiny PWAs and why I keep building them

#163
post #79
post #32

Earlier quoted context omitted.

Exactly. If more people's reaction, instead of searching an app store for a privacy respecting screen light, was to sit down and write: let on true; and were able to easily upload it somewhere on a phone and run it locally from a shortcut on the screen. We'd have hacker culture encouraged right there.

Upload? Come on, just load it as dataURI, bookmark it and you have offline "application" at your disposal. And as a bonus, here, have this "distributed app store" you can even print on paper [1]. [1] http://zxing.org/w/chart?cht=qr&chs=350x350&chld=L&choe=UTF-... i.e. QR-coded dataURI document data:text/html;charset=utf-8, Screen light

This is great! I added some text to it to make it more "user friendly" and compressed it a bit so that it fits inside a tweet: https://mobile.twitter.com/T0astBread/status/109220433722755...

  data:text/html,Screen LightScreen Light

Turn your screen into a light source
Tap to toggle

Source

Re: Tiny PWAs and why I keep building them

#164

When I first heard someone talking about "Progressive Web Apps" I thought they were talking about "Progressive Enhancement" [1]. Turns out doing a PWA is just basically about using the "Service Workers" API [2] and the practices around that. This nice article does a lengthy trace on the origins of the "PWA" term [3]. The same guy that started the "Service Workers" spec in Github [4] created the PWA marketing campaign…

I work on the same team (Web DevRel) as the "service worker guy" you mention (Jake Archibald). Alex Russell (who introduced the "PWA" and is now advocating for the "Never-Slow Mode" idea you may have heard about recently) works on Chrome but collaborates with us frequently. > When I first heard someone talking about "Progressive Web Apps" I thought they were talking about "Progressive Enhancement" Progressive enhance…

I think the confusion comes from the fact that one of the key principles of "Progressive Enhancement" was making the site accessible to everyone by providing support for browsers that either don't support JavaScript or have it disabled. This version of the website often also supported much older browsers (e.g. IE6-8, but also lynx, etc) that weren't supported by the enhanced version of the website.

In contrast, the PWA checklist makes no mention of support for browsers without JavaScript or much older browsers (and in practice very few PWAs provide such a fallback, as they are almost all SPA JavaScript apps where implementing this kind of fallback is difficult). As such, it is many ways the antithesis of the original Progressive Enhancement concept.

Re: Tiny PWAs and why I keep building them

#165
post #71

Holy crap it's scary that he's building his own speedometer like that. GPS based speedos aren't all that accurate. Ballpark, sure, but not accurate. There are also many circumstances under which GPS won't work. In many countries a car without a functional speedometer is not allowed on the road, for safety reasons.

the second generation Prius 2004-2009 has a dashboard instrument cluster flaw where the capacitors go bad after a number of years and it stops working.

this is well known in the prius chat boards.

Toyota also knew about it, but instead of making it a safety recall, they put out a service bulletin: T-SB-0172-09 Combination Meter - Intermittent Display

If you search the web for that you will find a ton of hits.

The solution is to replace the entire instrument cluster circuit board. If you have a replacement board, It's relatively easy, maybe an hour of work if you are handy, and there is no soldering unless you have no replacement and want to replace the bad capacitor yourself, and maybe a transistor. You will probably break your A/C vents in the process because they are made of a type of plastic that becomes extremely brittle with age.

There is a guy in Texas, Texas Hybrid Batteries, who will sell you a refurbished dash circuit board for $150 if you mail him yours. Buying a new one is a bit spendy and may require going through a dealer depending on laws, since the odometer is part of the assembly and has to be 'flashed' to what your vehicle was before the swap. However on cars of this age the odometer is often up to about 200,000 miles and exempt from a lot of the odometer laws.

Re: Tiny PWAs and why I keep building them

#166
post #75

Earlier quoted context omitted.

That was my first reaction. If I was pulled over in Ireland with no dash the car would be impounded . And the speedometer is great but what about the other info? Fuel gauge? Mileage? Battery Charge? Engine faults?? Geolocation won't help with any of those. That said I do love the PWA approach to things and I think more people should embrace it. Just... not for this.

Really doubt you are legally allowed to use GPS based speedometer in place of actual one either.

Are there jurisdictions that require a speedometer, vs requiring people to obey speed limits?

Re: Tiny PWAs and why I keep building them

#167
post #154
post #151

Earlier quoted context omitted.

If our drivers were smarter, we wouldn't need speedometers at all. Nobody thinks "I'm going too fast" then looks at the speedometer and decides "Oh, my speed is fine". Drivers who want to go fast will go fast - for them the gauge is only useful so they can slow down for speed traps. Not having a speedometer shouldn't make a sensible driver suddenly very dangerous at all.

> Not having a speedometer shouldn't make a sensible driver suddenly very dangerous at all. of course. Any sensible driver will not drive the car without a speedometer.

> of course. Any sensible driver will not drive the car without a speedometer.

I think you missed the point of my comment entirely.

Knowing your speed is not required to be safe while driving - being observant, correctly signaling, and driving at a speed appropriate for the conditions are.

Re: Tiny PWAs and why I keep building them

#168
post #162

Earlier quoted context omitted.

For 2, this is the one I'm most looking forward to: https://developers.google.com/web/updates/2018/11/writable-f... Entire classes of PWAs are essentially impossible to build right now because of the lack of ability to work with files directly, think offline editors, offline music players, etc.

FileWriter API existed in Chrome for a long time, but all attempts to push it mainstream failed due to Mozilla. I am curious if the latest attempt gets political backing from all members of W3C. Otherwise PWAs will stay pretty limited for toy apps; with WebAssembly and random local file access they could replace many desktop apps.

And if the standard on all this stuff is delayed, we're risking multiple incompatible APIs on all these features. Case in point: on Win10, PWAs get full access to the platform WinRT APIs (https://docs.microsoft.com/en-us/microsoft-edge/progressive-...). So they can do anything a native app can do - but that code isn't portable anywhere else.

Re: Tiny PWAs and why I keep building them

#169
post #146
post #135

Earlier quoted context omitted.

Where I live (Indiana, USA) the authorities would only find out I had a dead dashboard if I got into an accident and they discovered it while investigating. There are no vehicle inspections, ever. As long as I continue to drive without causing incidents, my vehicle's condition is of little significance to anyone except me.

Or if they pull you over for something, but then the first thing they ask is to turn your car off so they'd never see it anyway. Usually you pull over, turn your car off and put your hands on the steering wheel so when the police approach they know you don't have a weapon in your hands, or at least that was the etiquette I was taught. > There are no vehicle inspections, ever. As long as I continue to drive without ca…

Depending on the state in question, there can be many exemptions for those tests - e.g. if a car is new enough, and certified to comply with some standard or another.

Re: Tiny PWAs and why I keep building them

#170
I think it would be easier to build an Android/IOS app if you already have the dev tools installed. Chrome APIs needed for web apps that interact with hardware are often unstable and not supported on all hardware or android patch from vendors. I built a simple app to submit links to HN, took maybe an hour, without much Android knowledge.
Post reply on HN