Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
Think about it. Most native apps donât need all the native features of an app, such as bio-metrics, access Bluetooth and etc., so why not write an app once and be able to use it on any device? â introducing Progressive web apps
What are progressive web apps
PWAs are basically normal web apps with a manifest file and a service worker telling the browser how to cache files, what icons to use, splash screen to use, appâs name on the home screen and etc.. A service worker can also add offline support for your web app!
Why not just use a native app?
Why would e.g. a news app need anything other than your location or push notifications? Guess what, your web browser can ask for permission to use both of them. Although push notifications require a secure connection (https) and a service worker, itâs so much more convenient to write a single app for all platforms than having to rewrite and maintain code for all the different platforms. Many companies such as Twitter, NASA and Starbucks are already using PWAs and they look great:
PWA vs Native: Features and APIs
what web can do today, running on chrome 63, Feb 2018Advantages of PWAs:
- Multi-platformâââdevelopers only have to develop one code base, decreasing the cost and improving the quality of the final product
- Frictionlessâââalmost no download time, prompted to add to home screen when viewing the website. About 60% of mobile users donât download a single any new apps each month.
- Easily discoverableâââfrom visiting a website to an installation prompt and installation that takes less than 10Â seconds
- Small download size â
- Instant updatesâââservice workers allow new scripts / stylesheets to be used as soon as they are deployed to the server so the user doesnât even need to press an update button.
- Run on any device with a browser
Advantages of native apps:
- Fast, smooth animations
- Native looking UI
- Almost instant load
Platform support for PWAs
Android
Google has been actively pushing the concept of PWAs and they recently started to get a lot of attention from Apple, Samsung, Firefox and even Microsoft. Android now fully supports all PWA features and has been the first platform to do so.
iOS
Safari already experiments with service worker support which will probably lead to PWA support later this year. Although you canât âadd to homescreenâ on an iOS, you can still use push notifications.
Microsoft has already announced that Edge will support PWAs out of the book very soon. In fact, the most recent insiders version already supports it. However, only about 2% of users use Edge so we will need to rely on Chrome and Firefox implementing this feature. Fortunately, Chrome canary already contains a flag in chrome://flags that allows you to do this:
Developer Perspective
Deployment
If you even produced a native app, you know that the deployment process is painful and time consuming:
compile (production version) â create private key â sign the app â publish
With a progressive web app, all you need to do is:
build the web app (npm run build)â upload to server
Does this mean native apps will eventually die out?
No, not happening. Some types of apps will always require more features or great performance so a PWA simply wouldnât be a suitable option.
Conclusion
If youâre a developer and youâre planning on building a native app in 2018/2019, consider building a PWA instead of separate apps for each platform. You wonât have to maintain each version, the development version can be reduced by about 3 times and you donât need to learn all languages. Youâll love it. I will also have a few more tutorials on building a fully featured PWA with push notifications, offline support and caching with both angular and react, so if youâd like to see this, follow me so you donât miss a story.
Why Developers Love Progressive Web Apps was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.