JSFoo 2016

Tackling speed and performance for JavaScript

ranadeep bhuyan

@ranadeepbhuyan

Progressive web application for Speed using Google Polymers

Submitted Aug 12, 2016

Context – Starting with the learning from past mistakes – with couple of question to audience

Looking back to the history of web application development using HTML2 and HTTP/1.1, the web has evolved through a numerous tides of reactive measures in order to address some of major real world problems. We have come across number of client side technologies starting from introducing javascript into the browser till the time of desperate insertion pollyfils (to support a few HTML specs) into the browser platform. As well in the server side – we have made a lot of improvements from the world of ASP/JSP to SOAP/REST and Push servers.

On the user experience side – the industry has evolved with single page architecture with various javascript frame works and tools.

At times, when we start with new web application or re-architecture of an old application we all have to take a difficult decision at the beginning – that is, ‘what framework and tech stack are we going to use?’ Once the decision is taken we are stuck with the decision at least for two years or till we decide on the same decision again.

The ideal state to be in is possibly are the following attributes –
Super fast first page load from any full url within the application, quickly become responsive to the user actions, rich user experience (app-like) and reliable offline, works mostly with no/poor network. Reusability is one of the major factor as well.

Many of the current frameworks have been trying to solve for this ideal state in parts or in combination of a few for example SPA with serve side rendering. We are yet to see any magical combination of both server and client technologies coming together to solve for the wish list of the ideal state. There may be various reasons to this – like technical companies has competitions from each other, less collaborations, researchers are working in silo etc. As a result of this, almost all small or large organizations are creating large monolith stacks every now and then. Some of us are doing tech stack revamp every year and ends up creating another new monolith after two years.

What can we do to reach the ideal state?

How do we combine or develop specific tools and technologies to solve for developers and for customers as well –is this real paradigm shift for developers, browser companies and server technologies? Or is this a matter of coming together once for the community and customers to align to a single goal with single priority.

Let’s see how a Single page application built in (any) react JS frame work using HTTP2 push, service worker can achieve to the maximum for the above wish list of ideal state. We follow some of the best of the practices borrowed from the 17 UNIX philosophies (for Unix commands/programs).

We will demo a few small re-usable components using ReactJS and Google Polymers.

To Conclude - Modern browser should support couple of basic things like import, Custom elements for a better progressive web development for Speed. HTTP 2 and Polymers are currently the best combinations to work with web scalable and re-usable applications with all possible goodies like first page load, offline, re-usable etc.

Outline

  1. Pain points
    • Solutions evolved so far
    • Ideal State
  2. Progressive web
  3. Google polymers
  4. Demos
    • Server Push
    • Couple of Map polymers
    • Re-Usable Polymers for IOT

Requirements

Setting the context - 2 mins
Couple of learning from a few historical coding issues with HTML (with demo) - 4 mins
Ideal state - wish list - 5 mins
(Fast first load ready to use, App like rich UI, usable at offline mode, accessibility)

Pain points on existing solution (code demo) - 4 mins
(Couple of Current JS frameworks, services – a comprehensive Comparison slide, Custom UI elements, 2 way data binding, first page load time etc.)

Why Google Polymers? – Trying to address ideal state along with HTTP 2 Push
(UNIX like to our basic HTML/JS/Server programming practices) - 5mins

Progressive web application demo – 4 mins
(Using Server side rendering, Server Push, pre-cache, service worker, pre-render)
Accessibility - 2 mins
Re-usability - 3mins

Demo Few Re-Usable Polymers we have created
Google Maps elements – (demo 3 mins)
LED hello world demo - 2 mins
AR Parrot drone re-usable control Polymer with Node JS –(demo 3 mins)

Limitation of Polymers and temporary fix - 2 mins

Github code share – 1 min
Q&A – 4 mins

Speaker bio

We are from Intuit and passionate about Google’s idea of Speed and trying change the way we develop web applications at Inuit to deliver for customers and developers in a boundary less manner.

Ranadeep has been developing rich web applications including mobile apps for more than a decade using various cutting edge technologies on native and JavaScript technologies. Ramit brings a rich web application development experience from past experience in Commonfloor.com and now from Intuit. Both of them work for their flagship product devision of Small Business Groups - QuickBooks offering and www.intuitmarket.com a high scale websites.

Slides

http://bit.ly/2bwRbN6

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

JSFoo is a forum for discussing UI engineering; fullstack development; web applications engineering, performance, security and design; accessibility; and latest developments in #JavaScript. Follow JSFoo on Twitter more