DEV Community

loading...
Cover image for Why you should care about PWA

Why you should care about PWA

tomburgs profile image Toms Burgmanis ・2 min read

Why you should care about PWAs?

Many people have asked this, and it's typically the same old answer - It's web, but it's like a native application 🤯.

However, after the hype dies down, you're left there thinking - Ok, so what?

That's why I want to share with you what I think are the practical reasons of why you should care about PWAs.

The case of a small start-up.

Have a look at Ko-fi for example, their goal is similar to what Patreon does, but how could they ever compete?

After all, Ko-fi is only around 12 people, whereas Patreon is closer to 500 - that's 40 people for every one of Ko-fi's 😱!

It's clear that there's no practical way for them to actively develop & maintain mobile applications, yet Patreon has them, and now their users are unhappy 😔.

That's where PWA comes in, it could provide users with a native feeling experience at close-to-none additional development costs, yet it would still do everything they would need a mobile application to do.

Easier development.

It's almost no different than developing a modern, responsive website.

You simply are going to create a few more caching & notification bugs along the way 🤷.

What you have to do right.

There's one very important thing you have to do right, however a majority of developers seem to completely ignore this 🤕.

You have to ensure a native feeling application!

Many developers ignore ensuring device's safe-area insets, others ignore the Apple device status bar style.

Whatever it may be, you have to ensure that the application looks great and runs smoothly.

Useful tools to help you

An extremely useful framework for going full-native-like mode is Ionic.
It provides you with components that adapt to look like the native ones on every device.

If you're looking to start a new project, I will place a shameless plug and suggest you have a look at PWA Boilerplate.

Happy coding ❤️

Discussion

pic
Editor guide
Collapse
zoedreams profile image
☮️✝️☪️🕉☸️✡️☯️

PWA are great, however its important to take into consideration of building and learning how to utilize push technology to make for responsive design. Limiting yourself to 200ms response times are important to make your PWA feel like a desktop app verses just a website.

one type of architecture I have had great success with to exponetially decrease response times is to employ a hybrid RESTful push system.. Meaning have one traditional REST like api that allows for requests, and then use a push mechanism with socket.io to send the response over a persistent connection. This eliminates the need to construct response headers..

For example the PWA makes a rest call, the server processes it then forwards its response through a persistent connection (or rest) on a socket.io server that is a peer to it on the same LAN / router. the push server forwards the rest server response to the client. The client creates a unique guid for each rest request, and will be awaiting the push response with a simple async function. you put the request into a request call stack which pops off the request callback when the socket io push response comes in. this technique provides the speed of websockets while still using a tradition rest api. super fancy -- however it requires setting up a socket io push server. also reduces bandwidth and load on your rest server.

github.com/ZoeDreams/talk

Collapse
tomburgs profile image
Toms Burgmanis Author

Sounds like an interesting idea :)

I think it could work more neatly with a GraphQL API as it has subscriptions, have you ever tried it?

Collapse
dreplica profile image
dreplica

Absolutely

Collapse
zoedreams profile image
☮️✝️☪️🕉☸️✡️☯️

yes, and that works great with that, and other big data or real time applications.

Collapse
andrewbaisden profile image
Andrew Baisden

PWA is definitely the easiest way to create a mobile app experience.