Chrome, JavaScript, webdev

Progressive Web Apps Event At Campus TLV

Progressive Web Apps are experiences that combine the best of the web and the best of apps. They load quickly, even on flaky networks, can re-engage with users by sending web push notifications, have an icon on the home screen and load as top-level, full screen experiences.

Here are the slides from the keynote I gave today at Campus TLV.

If you want to see it in action, click on the image below.

noter-1 PWA in Nexus 6

Standard
Chrome, HTML5, JavaScript, webdev

How To Build A Progressive Web App?

noter-1

Why?

Progressive Web Apps are all about an amazing experience. You PWA should combine the best of the web and the best of apps. In the example above (yep, the ‘Noter web app‘) you can see that it is useful from the very first visit in a browser tab, to the launch from a home screen. As the user progressively builds a relationship with the App over time, it becomes more and more powerful. It loads quickly, even on flaky networks, it persistent and your notes are always there. It got an icon on the home screen and loads as a top-level, full screen experience. If you wish to add push notifications (which are great way to re-engage with your users) – pay attention to the tips in the image below.
What push notification be for your web app

How?

  • First step: I strongly recommend trying out the PWA code lab so you understand how the approach to this type of app may be similar (or not) from what you’re used to do.
  • Tech: Evaluate whether you’re going to just use vanilla JS for your app or a library/framework. See here for barebones PWA config or try Web Starter Kit for a starting point with a build process (=Gulp). Your PWA should supports the application shell architecture for faster first-paint and persistent.
    • Offline support: There are few libraries  for helping you with Service Worker pre-caching (sw-precache) and runtime caching (sw-toolbox). You can check this code lab for building your first offline web app as a starting point.
    • User Interface: Like anything on the web, there are lots of options for your UI. Some of the example PWAs take advantage of Material Design and there are libraries for using it available for vanilla JS, Polymer Paper elements, Angular Material and community efforts like Material UI for React.
    • Icons: I find both iconfinder.com and realfavicongenerator to be good resources. If you have the budget, it’s always great to get something polish from a designer.
    • Performance: Please follow the RAIL performance model:
      • Cable:
        • First load (network-bound), First paint at 1s or sooner, Speed Index of 1,000 or less, <100ms for response, <16ms for each frame.
        • Second load: first paint at 300ms or sooner, Speed Index of 1,000 or less.
      • 3G:
        • First load (network-bound), 3G (normal, as defined by WPT): First paint at 2s or sooner (including TLS handshake), Speed Index of 3,000 or less.
        • Second load (disk-bound because SW): First paint at 300ms or sooner, Speed Index of 1,000 or less.
      • Test your work with WebPageTest and Chrome DevTools.
  • Examples
    • Smaller Pictures – A great web app that will help you shrink photos.
    • Air Horner – The ‘must have’ web app for the olympics in the summer.
    • Voice Memos – Very useful when you have conversations with your spouse.
    • Offline Wikipedia – If you need to read something on the plane.
    • Guitar Tuner – For the ones that needs to tune their guitar.
    • Zuperkulblog – Good if you thinking on a PWA for publishers.
    • Snapdrop – an Apple Airdrop in HTML.
    • More on this pwa-list.
The main features for progressive web app

The main features for progressive web app

Misc

 Be strong and build something amazing!

Standard
Chrome

Progressive Web Apps – Offline And Add To Home Screen

Screenshot 2015-05-13 18.04.53

Why?

Progressive Web Apps are all about an amazing experience. To me, it’s the moment you see your users happy from the quality experience you gave them.
Web apps should be useful to users from the very first visit (where it’s fast and useful even with bad connection), to the launch from a home screen or push notification. There are many good use-cases for a new web apps with these capabilities. However, think on your own site/app today and see if it can benefit from these aspects.
I think that in most cases, the answer will be: Yes Please!

How?

We needs to follow these two steps: Serve our web app over HTTPS and leverage service worker.
The third step, is in the hands of our users. It is a good reflection to our quality of work and if our web app is useful for them.
Screen Shot 2016-03-20 at 2.48.48 PM

Let’s see what are some of the good resources we have today in order to jump into the water.

Offer an offline experience

You should serve your site over HTTPs and implement Service Workers. Here are two good tutorials to show you how to implement it on a new project or a current one:

  1. Offline code lab – The famous Air Horner web app. It is extra useful during a good football game.
  2. Your first PWA – Weather web app.

Continue reading

Standard
Chrome

Chrome 48 Updates And News

Google-Chrome-Canary-logoAs every six weeks (more or less), we got some cool & new features in Chrome. Here are few that I like for version 48:

Presentation API

This version of Chrome Android allows websites to present to external devices via Cast, increasing the form factors available to sites that want to present content. You can also present from your desktop with this Cast extension.

Custom buttons on notifications

Timely, personalized notifications save users the effort of manually checking for updates throughout the day and have enabled a host of new experiences from real-time communication to live updates on breaking news. Continue reading

Standard
Chrome, JavaScript, webdev

Chrome 47 Updates And Web News

  • google-chrome-logoInput Device Capabilities: Chrome 47 has a new feature that makes it easier to understand the how users interact with your site: InputDeviceCapabilities! DOM input events are an abstraction above low-level input events, loosely tied to physical device input (e.g., click events can be fired by a mouse, touchscreen, or keyboard). However, there is a problem: there is no simple method to obtain the details of the physical device responsible for an event. In addition, certain types of input can generate further “fake” DOM input events for compatibility reasons. One such fake DOM event happens when a user taps a touch screen (such as on a mobile phone); it not only fires touch events but, for compatibility reasons, mouse events as well. The new InputDeviceCapabilities API provides details about the underlying sources of input events this come to helps with problems when supporting both mouse and touch input. Read More: developers.google.com/web/updates/2015/10/inputdevicecapabilities
  • Adding a Splash screen for installed web apps – Over the past year we saw an effort in the Chrome team to let developers build sites and apps that feel like they are installed on the user’s system. The home screen launch process on Android is a great first step. In Chrome 46 on Android, we got the background_color that removes any delay and paints the screen with a solid color until the browser is ready to paint something from the web page. This was a good addition, yet it still didn’t look fully like an app. Now in Chrome 47 on Android, Beta these days as of October 2015, we are introducing the concept of a “splash screen”. Have a look:

Continue reading

Standard
Chrome, JavaScript, webdev

Chrome 46 Updates

google-chrome-logo

Performance

Service Worker

Continue reading

Standard
Chrome, webdev

Chrome’s Market Share And Service Worker

According to Stat Counter in the past 3 months Chrome made a progress in market share. It’s now got ~31% world wide. But if we dive a bit deeper into the chart below we can see that the situation on mobile is even better.

StatCounter-browser-ww-monthly-201502-201505

Take into consideration that Chrome + Android + UC Browser + Opera is ~70% of the market it’s a great news for web developers in terms of APIs. I hope to see soon the power of Service Worker and Push notifications in many more browsers. It’s the start of a new wave of web apps that look and feel similar to native apps. Continue reading

Standard
Chrome, HTML5, JavaScript, webdev

Chrome And The Web App Revolution

chrome 3dQuick update from the world of Chrome. The new version in stable (chrome://version = 42 just like the answer to the universe) brings some interesting and powerful features that give web developers more options to create amazing experiences.

google-chrome-logo

Chrome 42 (stable)

We are getting to a world where web developer could create web apps that act just like ‘native apps’ without any bridges (e.g. Cordova). The main enablers APIs are already in this version. Check out what you can do today with Service Worker and the options it’s giving you to cache, work offline and push notifications in the background. Here is an example I wrote that uses service worker to cache & offline. I think we are going to see some very interesting implications. There are many options for the “physical mobile web” and these powerful APIs. Continue reading

Standard
Chrome, JavaScript, mobile, webdev

Physical Web On Mobile

Physical Web is the new approach to unleash the core superpower of the web: interaction on demand.
People should be able to walk up to any smart device, think on classic cases like: a vending machine, an art item, a poster, a toy, a bus stop, a rental car – and not have to download an app first. They should be able to just tap and interact with them.

forest in the morning

The Physical Web is not shipping yet nor is it a Google product. This is an early-stage experimental project and we’re developing it out in the open as we do all things related to the web. This should only be of interest to developers looking to test out this feature and provide feedback. The Physical Web is an effort to extend the core superpower of the web – the URL – to everyday physical objects. The user experience of smart objects should be much like links in a web browser: i.e., just tap and use. At its base, the Physical Web is a discovery service: a smart object broadcasts relevant URLs that any nearby device can receive.
This simple capability can unlock exciting new ways to interact with the Web. Continue reading

Standard