<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Suhas Mehta on Medium]]></title>
        <description><![CDATA[Stories by Suhas Mehta on Medium]]></description>
        <link>https://medium.com/@suhas.mehta?source=rss-bbca72b73977------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*iaRbwBkB-1_vCWff.</url>
            <title>Stories by Suhas Mehta on Medium</title>
            <link>https://medium.com/@suhas.mehta?source=rss-bbca72b73977------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:08:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@suhas.mehta/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Progressive Web Applications-Introduction]]></title>
            <link>https://medium.com/@suhas.mehta/progressive-web-applications-introduction-8f2db8af11c3?source=rss-bbca72b73977------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f2db8af11c3</guid>
            <category><![CDATA[pwa]]></category>
            <category><![CDATA[progressive-web-app]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[chromeextention]]></category>
            <dc:creator><![CDATA[Suhas Mehta]]></dc:creator>
            <pubDate>Sun, 18 Feb 2018 15:32:12 GMT</pubDate>
            <atom:updated>2018-02-18T16:18:42.710Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uCFGdkCP3P6SKv71HvUUFA.png" /></figure><p>Picture Courtesy — <a href="http://developer.google.com/">developer.google.com</a></p><p>So here am I, writing my first article on PWA’s or also known as Progressive Web Applications. PWA’s are there from a long time and as the modern browsers are getting more powerful, we expect to build applications which are not just a old school website but a full-stack web based application. In this article, I will be talking about what are exactly PWA’s and how can they be useful over a traditional web apps and how can you migrate them.</p><p>PWA’s are enhanced user experiences, which are available on the web and can be -</p><ul><li><strong>Reliable</strong> — Load instantly and never show the downasaur (Dinosaur), even in uncertain network conditions.</li><li><strong>Fast</strong> — Respond quickly to user interactions with silky smooth animations and no janky scrolling.</li><li><strong>Engaging</strong> — Feel like a natural app on the device, with an immersive user experience.</li></ul><p>We will be talking about <strong>reliability</strong> in detail below. PWA’s caught my eye when I started working on a server-less architecture on AWS. Even though server-less are for faster response times, but due to serverless applications which are behind corporate network they get a latency issue (as there are multiple cloud components) which became one of the prominent issue of the application, I was building. Only characteristics I was intrigued of a PWA first, was the offline behavior of the application, If I am able to create an offline application on the web with a local database (SQL or NoSQL) which can sync automatically with the persistence layer on the cloud that will be a great win. As no one wants to use a slow app!</p><p><strong>Reliable</strong></p><p>We need an application which is reliable and can work in slow or even no network. Users don’t expect the web to work without a network connect, and often don’t even bother to try when it’s a slow or intermittent connection. <strong><em>We need to change that perception</em></strong>. The web <strong>must</strong> be reliable. In order to understand how can we make a web application work without internet, we need to know <strong>Service Workers</strong>.</p><p>So what are <strong>service workers, </strong>from a non technical perspective, these are the people (basically, its a separate thread in browser) who work behind the browser to help our application get the data when there is an active network available or even in low network. So think about this example, while you are filling out a form, or reading through a paragraph, or even staying idle on a page to grab a coffee, it will automatically grab the data which you might need later on (sounds fun right !).</p><p><strong>Things to note about a service worker:</strong></p><ul><li>It’s a JavaScript Worker, so it can’t access the DOM directly. Instead, a service worker can communicate with the pages it controls by responding to messages sent via the postMessage interface, and those pages can manipulate the DOM if needed.</li><li>Service worker is a programmable network proxy, allowing you to control how network requests from your page are handled.</li><li>It’s terminated when not in use, and restarted when it’s next needed, so you cannot rely on global state within a service worker’s onfetch and onmessage handlers. If there is information that you need to persist and reuse across restarts, service workers do have access to the IndexedDB API.</li><li>Service workers make extensive use of promises, so if you’re new to promises, then you should stop reading this and read about Promises first.</li></ul><p>Today, <strong>service workers</strong> already include features like <a href="https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web">push notifications</a> and <a href="https://developers.google.com/web/updates/2015/12/background-sync">background sync</a>. In the future, service workers will support other things like periodic sync or geofencing. The core feature discussed in this tutorial is the ability to intercept and handle network requests, including programmatically managing a cache of responses.</p><p><strong>Migration</strong></p><p>Let us talk about migration, I am still <strong>work in progress </strong>of my application to be PWA, but there is checklist from Google which you can go over and see what you all need to work on step by step to have a PWA ready. I will provide you the links at the bottom of the article where you can find more info on PWA.</p><p>There are few options I am working on currently for migration to a PWA -</p><p>1. <strong>Electron JS</strong> — Basically a native desktop application (Mac or Windows) which can have a local db layer which can sync automatically with cloud through service workers. Apps like <strong>Slack</strong>, <strong>Github Desktop, Atom</strong> are built on ElectronJS and a pretty successful when it comes to offline behavior as well as user experience. We can have our local mongoDB instance running and can sync it with noSQL/SQL db in the cloud. We can use pouchDB for syncing and replication.</p><p>2. <strong>Chrome Extension — </strong>Creating an extension like Postman. It’s an amazing tool, I went over the Postman repo on <a href="https://github.com/postmanlabs/postman-chrome-extension-legacy">GitHub</a>. We can bundle our react/angular components using webpack or gulp and put it up there. I haven’t implemented an extension yet, so I cannot say much about it but It is one of the way towards PWA.</p><p>3.<strong> Web Based and integrating PWA characteristics — </strong>In this approach we follow the google PWA checklist and try to incorporate <strong>service workers</strong>, and have an <strong>indexedDB</strong> in our browser or a <strong>.DAT</strong> file which can be downloaded which stores the data as a local. Later on we can sync the local db, using pouchDB <a href="https://pouchdb.com/">https://pouchdb.com/</a>. Simply putting this, we are changing our code base to have a <strong>indexedDB </strong>(or a .dat file) which can have slow start time while loading all the requests but it will be smooth after the first load. We can have a cache storage in the browser which store data and can be updated using Push Events. There are many different ways to approach this.</p><p>If you are thinking to create a PWA from <strong>scratch</strong> there a very nice code lab by Google which you can use as a starting point <a href="https://codelabs.developers.google.com/codelabs/your-first-pwapp/#0">https://codelabs.developers.google.com/codelabs/your-first-pwapp/#0</a>. Google also provides a very nice testing tool for your PWA, Lighthouse. It is an <a href="https://github.com/GoogleChrome/lighthouse">open-source</a>, automated tool for improving the quality of web pages. You can run it against any web page, public or requiring authentication. It has audits for performance, accessibility, progressive web apps, and more. <a href="https://developers.google.com/web/tools/lighthouse/">https://developers.google.com/web/tools/lighthouse/</a></p><p><strong>Challenges in PWA</strong></p><p>There are some challenges in PWA which has to be considered while choosing it.</p><ul><li><strong>Cross Browser Support</strong> : While Chrome, Firefox, Opera, and Samsung’s android browser supports PWA, IE, Edge and Safari are yet to extent its support.</li><li><strong>Limited Functionality</strong>: PWA doesn’t have support to any hardware that is not supported by HTML5</li><li><strong>Limited Legitimacy</strong>: As there is no central download Store for PWA, they lack in giving a sense of legitimacy and confidence which is usually given by native apps from Play Store/App Store.</li><li><strong>Cross Application Login Support</strong> : Native apps have capability to talk to other apps and authenticate logins (Facebook, Twitter, Google). As a webpage, PWA doesn’t have capability to communicate with other apps installed.</li></ul><p>In my future articles, I will be writing about creating first PWA on ElectronJS as well as migrating existing Web Application as I continue to explore more on this.</p><p>PWA Checklist <a href="https://developers.google.com/web/progressive-web-apps/checklist">https://developers.google.com/web/progressive-web-apps/checklist</a></p><p>For More Info on PWA -</p><p><a href="https://developers.google.com/web/progressive-web-apps/">https://developers.google.com/web/progressive-web-apps/</a></p><p><a href="https://medium.com/@deepusnath/4-points-to-keep-in-mind-before-introducing-progressive-web-apps-pwa-to-your-team-8dc66bcf6011">https://medium.com/@deepusnath/4-points-to-keep-in-mind-before-introducing-progressive-web-apps-pwa-to-your-team-8dc66bc…</a></p><p>Reference -<br><a href="https://developers.google.com/web/progressive-web-apps/">https://developers.google.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f2db8af11c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>