• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Angular 1 Dribbble Progressive Web App demo

Dribbble PWA

This is an Angular 1 Dribbble Progressive Web App, initially based on this implementation. Live Demo

Changes made:

  • Added support for Service Worker and app-shell caching using sw-precache
  • Added runtime caching of Dribbble API assets using sw-toolbox
  • Added critical-path CSS optimisation (I didn't use loadCSS this time as a number of browsers now no longer block body styles)
  • Refactored out Bootstrap.css using uncss and manual trimming
  • Switched to async loading the Angular/application bundle
  • Added in 'Cherry' theming. Icon credit
  • Some general clean-up of the app

Looking at WebPageTest, on cable the original implementation reached visual completeness in 28s. Compare this to the 8.5s we reach with the above optimisations. Read below for notes on why, whilst this is an improvement, it's nowhere near where we should be hitting on mobile (ideally visually complete in 1s on cable, 3s on 3G).

Notes from my Google I/O talk

Progressive Web App features can technically be added to a legacy application built using something like Angular 1. By that I mean that you can cache resources and your shell offline using Service Worker and can get some mileague by applying general web performance optimisations. This will make your perceived load time and repeat visit times better than the average Angular 1 app.

Unfortunately, looking at the data (3G on WebPageTest) the important thing this setup will always lack is reliable performance, a critical part of what makes PWAs so good. Service Worker will slash your repeat load times for static and dynamic assets, but that's about it. It won't improve your Angular 1 bootup times and how slow your application may otherwise be on a phone.

As the majority of legacy frameworks weren't built with mobile and slower handsets in mind, an Angular 1 PWA is never going to be as fast as something built using a more modern framework (see the direction Angular 2 is taking with Angular Mobile Toolkit) or simply just using server-side rendering and vanilla JavaScript.

For those that can't yet update to a newer framework/stack, I hope some of the ideas here prove useful.

Note that this app does not really take advantage of server-side rendering Angular for content. We SSR the shell, but that's about it. Many of the solutions built to tackle this problem over the years were slow and clunky. If I was using something today, it would probably be angularjs-server, which uses jsdom.

Setup

Clone the repository then cd into the project and:

$ npm install
$ npm run build
$ npm run start

More Repositories

1

critical

Extract & Inline Critical-path CSS in HTML pages
JavaScript
10,033
star
2

backbone-fundamentals

๐Ÿ“– A creative-commons book on Backbone.js for beginners and advanced users alike
JavaScript
9,294
star
3

essential-js-design-patterns

Repo for my 'Learning JavaScript Design Patterns' book
HTML
4,254
star
4

es6-tools

An aggregation of tooling for using ES6 today
3,954
star
5

basket.js

A script and resource loader for caching & loading files with localStorage
JavaScript
3,362
star
6

es6-equivalents-in-es5

WIP - ES6 Equivalents In ES5
2,531
star
7

puppeteer-webperf

Automating Web Performance testing with Puppeteer ๐ŸŽช
JavaScript
1,791
star
8

a11y

Accessibility audit tooling for the web (beta)
JavaScript
1,710
star
9

tmi

TMI (Too Many Images) - discover your image weight on the web
JavaScript
1,640
star
10

timing.js

Navigation Timing API measurement helpers
JavaScript
1,498
star
11

critical-path-css-tools

Tools to prioritize above-the-fold (critical-path) CSS
1,141
star
12

getUserMedia.js

Shim for getUserMedia(). Uses native implementation for modern browsers and a Flash fallback for everyone else.
JavaScript
908
star
13

critical-path-css-demo

Above-the-fold CSS generation + inlining using Critical & Gulp
ApacheConf
532
star
14

backbone-boilerplates

Backbone.js stack boilerplates demonstrating integration with Express, Ruby, PHP, Grails and more.
JavaScript
488
star
15

chatty

ChattyUI - your private AI chat for running LLMs in the browser
TypeScript
449
star
16

webpack-lighthouse-plugin

A Webpack plugin for Lighthouse
JavaScript
290
star
17

learning-jsdp

Learning JavaScript Design Patterns: 2nd Edition - The Examples
HTML
253
star
18

sublime-fixmyjs

SublimeText package for FixMyJS
Python
250
star
19

predictive-fetching

Improve performance by predictively fetching pages a user is likely to need
238
star
20

storage-on-the-web

๐Ÿ—ƒ Comparing storage options for the open web in 2016
225
star
21

visibly.js

A cross-browser Page Visibility API shim
JavaScript
221
star
22

sublime-build-systems

Sublime Text build systems
202
star
23

yeoman-examples

A repo of up to date examples using Yeoman
JavaScript
202
star
24

oust

Extract URLs to stylesheets, scripts, links, images or HTML imports from HTML
JavaScript
178
star
25

cssprettifier-bookmarklet

A bookmarklet for prettifying your CSS
JavaScript
174
star
26

polymer-boilerplate

A Polymer.js template for building fast, robust web apps using Web Components
JavaScript
166
star
27

pubsubz

Another Pub/Sub implementation
JavaScript
164
star
28

backbone-mobile-search

A Backbone.js + jQuery Mobile sample app using AMD for separation of modules, Require.js for dependency management + template externalisation and Underscore for templating
JavaScript
154
star
29

prism-js

A Polymer element for syntax highlighting with Prism.js
HTML
149
star
30

starter

A simple, git-clone friendly starting point for personal projects.
JavaScript
145
star
31

memoize.js

A faster JavaScript memoizer
JavaScript
143
star
32

largescale-demo

Scalable JS architecture demo for #jqcon
JavaScript
138
star
33

psi-gulp-sample

Sample Gulp project using PSI
JavaScript
126
star
34

preact-hn

๐Ÿ—ž Preact Hacker News
JavaScript
121
star
35

network-emulation-conditions

Network emulation / throttling conditions (2G, 3G, 4G, Wifi etc) โ˜Ž๏ธ
JavaScript
108
star
36

bubblesort

Bubble Sort implementation with O(n^2) complexity.
JavaScript
106
star
37

polymer-filters

Polymer filters for formatting values of expressions.
JavaScript
105
star
38

ember-progressive-webapp

Ember.js Zuperkulblog PWA (built with FastBoot and ember-cli)
JavaScript
97
star
39

memory-mysteries

V8 memory mysteries (sample app)
CSS
84
star
40

smaller-pictures-app

Smaller Pics Progressive Web App
JavaScript
82
star
41

x-instagram

[Deprecated] A Polymer element for querying the Instagram API (Note: not yet updated to Polymer 0.5.x)
JavaScript
76
star
42

x-imager

Responsive images using Imager.js and Polymer
74
star
43

backbonejs-gallery

A Backbone, Underscore and jQuery Templates based image gallery (early early beta)
JavaScript
72
star
44

todomvc-angular-4

Angular 4.x TodoMVC implementation
TypeScript
66
star
45

socketchat

SocketChat - a beginners chat app using SocketStream
CSS
63
star
46

github-watchers-button

An Embeddable GitHub 'Watchers' Button For External Pages
JavaScript
63
star
47

gulp-uncss-task

[Deprecated] Use gulp-uncss instead please.
JavaScript
63
star
48

yt-jukebox

A YouTube Jukebox element built with Polymer & Yeoman
JavaScript
61
star
49

critical-path-angular-demo

Above-the-fold CSS generation + inlining using Critical, Gulp & Angular
JavaScript
60
star
50

native-media-resizing

Draft proposal for browser-level media resizing
59
star
51

catclock

Polymer + Material Timer/Countdown/Countdown app (alpha)
JavaScript
56
star
52

recursive-binarysearch

Recursive Binary Search with O(log N) complexity
JavaScript
56
star
53

selectionsort

Selection sort with O(n^2) time complexity
JavaScript
56
star
54

polymer-grunt-example

Polymer + Grunt
JavaScript
56
star
55

microtemplatez

Another compact micro-templating solution
JavaScript
55
star
56

page-er

A Polymer element for paginating model data
CSS
53
star
57

google-slides

โšก An offline-enabled Polymer slide-deck
HTML
53
star
58

flickly-wireframe

The jQuery mobile wireframe for Flickly
52
star
59

grunt-uncss-sass-example

An example of using grunt-uncss on a Sass project
JavaScript
52
star
60

sparkle-trail

<sparkle-trail> Polymer element - useful as a pre-loader
CSS
51
star
61

cssdiet

(WIP) - A DevTools extension for multi-page unused CSS auditing
JavaScript
46
star
62

github-client

Angular GitHub client for Firefox OS
JavaScript
44
star
63

a11y-webapp

A11y WebApp built with Polymer (WIP)
JavaScript
44
star
64

backbone-koans-qunit

Backbone Koans for QUnit
JavaScript
44
star
65

video-js

A Polymer element for Video.js
CSS
42
star
66

generator-webapp-uncss

Yeoman generator with grunt-uncss
JavaScript
42
star
67

lottie-animation-demo

Network-aware adaptive loading with Lottie Web
JavaScript
42
star
68

spine.bitly

(Demo app) A Spine.js Bit.ly client for shortening URLs and archiving references to these links offline.
JavaScript
39
star
69

backbone-aura

Backbone Aura
38
star
70

es2015-todomvc-chrome

ES2015 TodoMVC app that works without a transpiler
JavaScript
38
star
71

critical-css-weather-app

Critical-path CSS optimized weather app
JavaScript
37
star
72

polymer-blog

A tutorial app for generator-polymer
JavaScript
33
star
73

generator-boilerplate

A simple Yeoman generator using Git submodules to clone over a boilerplate hosted elsewhere on GitHub
JavaScript
31
star
74

npm-and-polymer-demo

Demo of Polymer + Paper elements working off npm3
HTML
30
star
75

jquery-roundrr

A jQuery plugin for plotting interactive content galleries in a circle form
JavaScript
30
star
76

polymer-localforage

A Polymer element for Mozilla's localForage (async storage via IndexedDB or WebSQL)
HTML
30
star
77

devtools-timeline-model-browser

Browser-friendly helper for parsing DevTools Timeline traces into structured profiling data models
JavaScript
29
star
78

mustache-for-chromeapps

A special build of mustache that works in Chrome Apps under CSP
JavaScript
28
star
79

addyosmani

GitHub README
27
star
80

active-route

Active view routing for Polymer extending <template>
CSS
25
star
81

tmdb-viewer-load-more

Accessibility-friendly version of TMDB Viewer (load-more)
JavaScript
25
star
82

webapp-scaffold

Polymer webapp scaffold element
CSS
25
star
83

typeahead-country

A Polymer element for autocompleting country names
24
star
84

react-interop

React + Polymer + X-Tag interop
JavaScript
24
star
85

vue-cli-todomvc

TodoMVC built using the Vue.js 2.0 CLI ๐Ÿฐ
JavaScript
22
star
86

polymer-browserify-vulcanize

Polymer + Browserify + Vulcanize
JavaScript
22
star
87

es6-starter

A minimal starting point for using ES6 today.
JavaScript
21
star
88

faster-video

A Polymer element for <video> with playback speed controls
JavaScript
21
star
89

js-shapelib

A minimalist JavaScript library for drawing objects around a Circle or Ellipse
JavaScript
19
star
90

element-query

Element queries with Polymer (experimental fork)
CSS
19
star
91

clientside-sample-buildfile

A Client-side ANT Build File Example
19
star
92

parsely

A small utility for parsing URLs of all types.
JavaScript
18
star
93

video-player

A themeable Polymer video element
JavaScript
16
star
94

page-router

Declarative URL routing for Polymer elements.
CSS
16
star
95

polymer-eventemitter

A Polymer event emitter element with support for wildcards, many and once.
JavaScript
15
star
96

lighthouse-reports

Quick module for getting Lighthouse reports in JSON form
JavaScript
15
star
97

generator-es6

An ES6.now project generator for Yeoman.
JavaScript
14
star
98

aura

A scalable, event-driven JavaScript architecture for developing widget-based applications. Works with Backbone.js and other frameworks.
14
star
99

jquery-googleviewer-plugin

A compact Google Viewer plugin
14
star
100

medium-backups

HTML
13
star