• This repository has been archived on 01/Sep/2022
  • Stars
    star
    1,087
  • Rank 42,594 (Top 0.9 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 12 years ago
  • Updated about 2 years ago

Reviews

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

Repository Details

Filament Group's core tools & workflow for delivering rich cross-device web applications

⚠️ This project is archived and the repository is no longer maintained.

SouthStreet Workflow

Filament Group

Our tools and workflow for building fast and accessible cross-device web applications

SouthStreet is a set of tools that combine to form the progressive enhancement workflow we use on projects at Filament Group. This workflow is designed to help us deliver modern web experiences that are accessible to the widest range of devices possible.

While we have many open-source projects related to cross-device usability, SouthStreet is focused particularly on the process of delivering enhancements efficiently so that users receive a page that works as soon as possible.

Our SouthStreet workflow utilizes the following tools, all of which are independent Github projects themselves.

  • Enhance: a small JavaScript boilerplate designed to help determine if a browser is capable of handling additional user interface enhancements, and load specific enhancements for that browser as fast and simply as possible.
  • loadCSS: A function for loading CSS asynchronously.
  • loadJS: A function for loading JS asynchronously.
  • cookie: Get, set, or forget cookies.
  • criticalCSS: A command-line tool for extracting critical CSS for a page. (we use this with grunt-criticalCSS)
  • Grunticon: A grunt-based tool to make it easy to use SVG graphics with fallbacks for older browsers.
  • AjaxInclude: a plugin that is designed for modular content construction, that runs on jQuery (or our Shoestring DOM utility)
  • Picturefill: A responsive images polyfill.

Together these tools form the core of Filament Group's progressive enhancement workflow. The scope of these individual projects vary widely, but they all share a common goal of serving front-end code faster, either by preventing or deferring the loading of code and assets that are not essential to the device, or by offering light-weight alternatives to common patterns.

For demonstration purposes, the Demo page of this repository contains a working example of these tools working together.

Please note that while these tools do represent key components of our overall approach, their applicability to a particular project always varies, and these particular projects are not always the best tool for the job at hand. Depending on whether a particular tool makes sense for the problem we're solving, we will often use alternative tools that provide similar functionality instead. For example, we commonly use jQuery instead of Shoestring (below), as Shoestring provides a small subset of jQuery's featureset, and is not always appropriate for the needs of our projects. In essence, the projects in SouthStreet are developed with a goal of ease of use and compatibility, but they should always be evaluated against other potential solutions.

Let's break down the role that each one plays.

Initial Page Load Tools

The following SouthStreet tools are used in the initial page load step.

Enhance (v2)

Enhance is a tiny JavaScript boilerplate designed to help developers keep overhead low while delivering enhancements to differing devices and device categories. Technically speaking, the role of Enhance is to determine if a browser is broadly capable of handling additional JavaScript and CSS enhancements, and then load specific enhancements for that browser as fast and simply as possible. Enhance is designed to be delete-key-friendly, but it includes a few other SouthStreet projects inside it for convenience (namely, loadCSS, loadJS, and cookie).

Typically, a site that uses Enhance will start by including enhance.js directly in the head of the page -inline, not an external reference. Within enhance.js, the following steps are often taken:

  1. Define some variables and functions for loading assets and accessing information about the browser and markup
  2. Run one or more tests to see if a browser is qualified to load and render additional enhancements
    • A. If it's not qualified, exit early and do nothing more
    • B. If it is qualified, proceed on to load additional assets, add classes to the document, etc.

For an example of how this process actually breaks down in JavaScript, check out the enhance.js file in this repository.

CriticalCSS

Critical CSS is a task we typically run during a build process. We use the task to evaluate every unique template in a site to determine the subset of styles in a site's CSS that are necessary to render the top portion of the page. As these styles are determined, we write them to files that are intended to be included directly in the head of each template, on the server-side. Inlining only these most critical of styles allows us to avoid making render-blocking requests from the head of the page, which dramatically increase the time it takes for a page to be usable. Once included in a template, we use EnhanceJS to request the rest of the site's CSS in a single request, and to set a cookie that tells the server on subsequent visits that the full CSS file is most likely cached now and can be referenced from the head of the page (instead of inline styles).

Inlining CSS this way is designed to optimize the first visit to any page on a site, aiming to render a usable page in less than a second on a modern connection. It follows the recommendations from Google's Pagespeed Insights. Check out our own site's score on PSI to see how well it works in action.

For examples of how we recommend configuring the head of a page to use EnhanceJS and CriticalCSS together, check out the EnhanceJS readme, or explore the demo files in this project.

Grunticon

Grunticon is a Grunt-based tool to make it easy to use SVG graphics with fallbacks for older browsers. We run Grunticon alongside our other build-time tasks to create CSS files that include our icons, which we then load asynchronously using Grunticon’s generated loader script, or by using our own scripts like loadCSS.

Secondary Enhancement JavaScript Files

The following SouthStreet scripts are typically loaded in a qualified manner by EnhanceJS, after bundling them in a single file amongst any other scripts we may need. These are part of SouthStreet purely because they serve the purpose of facilitating further enhancements to a page (by fetching assets conditionally).

AjaxInclude

AjaxInclude shapes the way we think about content and document construction in a major way. AjaxInclude uses the jQuery (or Shoestring if you don't otherwise need jQuery) API to bring the concept of an "include" to HTML, allowing us to deliver lightweight web pages that contain only the most essential content, and lazy-loading additional content automatically via JavaScript.

AjaxInclude works by referencing external fragments of HTML content via HTML5 data attributes. For example:

<a href="articles/latest/" data-before="articles/latest/fragment">Latest Articles</a>

In this case, we have an ordinary link to external content, which is essential for accessibility across all devices, but the link is also tagged with a data-before attribute that references a URL that contains a fragment of that external content to pull into the page. The AjaxInclude plugin will see this and include that content before the link.

You can add these attributes to elements in your page anywhere non-essential fragments of content can be included from an external URL. jQuery-api-like qualifiers like data-after, data-before, data-append, and data-replace are all supported. Also, the data-threshold attr allows a min width for this to apply.

Note: these attributes can be placed on any element, not just anchors. You might find data-append to be most useful on container elements.

Once the DOM is ready, you can apply the plugin like this:

$("[data-append],[data-replace],[data-after],[data-before]").ajaxInclude();

Picturefill

Picturefill, while listed last in the SouthStreet lineup is one of the most critical pieces of all with regards to delivery optimization. Picturefill allows us to reference several sources for a particular image in an HTML document, and based on which source's media query matches, Picturefill will load only one image appropriate to that context (and reevaluate whenever the viewport dimensions change as well).

Recap

The tools above combine to form the backbone of the SouthStreet workflow. Now that you understand the foundations, seeing it all in action should bring additional clarity. This repository includes a demo (_demo.html) that uses "Enhance" and "QuickConcat" to conditionally load a set of JavaScript and CSS files. If you check out the repo and run it on a web server, you'll get the full effect. We'll look to improve the demo further to utilize Shoestring and AjaxInclude as well soon, but this should give you a good idea of how things can work.

You can find more projects at our website as well. Filament Group, Inc

More Repositories

1

loadCSS

Load CSS asynchronously
JavaScript
6,716
star
2

tablesaw

A group of plugins for responsive tables.
JavaScript
5,481
star
3

grunticon

A mystical CSS icon solution.
HTML
3,304
star
4

criticalCSS

Finds the Above the Fold CSS for your page, and outputs it into a file
JavaScript
1,698
star
5

fixed-sticky

DEPRECATED: A position: sticky polyfill that works with filamentgroup/fixed-fixed for a safer position:fixed fallback.
JavaScript
1,486
star
6

Responsive-Images

NOTE: use Picturefill instead. An Experiment with Mobile-First Images that Scale Responsively & Responsibly
JavaScript
1,382
star
7

SocialCount

Unmaintained (see the README): Simple barebones project to show share counts from various social networks.
JavaScript
1,357
star
8

select-css

Cross-browser styles for consistent select element styling
CSS
1,238
star
9

glyphhanger

Your web font utility belt. It can subset web fonts. It can find unicode-ranges for you automatically. It makes julienne fries.
JavaScript
1,112
star
10

Overthrow

A tiny, no-frills, framework-independent, targeted overflow: auto polyfill for use in responsive design.
JavaScript
907
star
11

responsive-carousel

A jQuery-based script for responsive carousels that work with mouse, touch, and keyboard
JavaScript
904
star
12

loadJS

A simple function for asynchronously loading JavaScript files
JavaScript
892
star
13

Ajax-Include-Pattern

An Ajax-Include Pattern for Modular Content
JavaScript
625
star
14

tappy

Retired (see README): Tappy! - a lightweight normalized tap event.
HTML
572
star
15

politespace

Politely add spaces to numeric form values to increase readability (credit card numbers, phone numbers, etc).
JavaScript
535
star
16

grunt-criticalcss

Grunt wrapper for criticalcss
JavaScript
530
star
17

enhance

A JavaScript workflow designed to progressively enhance sites in a qualified manner.
JavaScript
489
star
18

shoestring

A lightweight, simple DOM utility made to run on a tight budget.
JavaScript
440
star
19

imaging-heap

A command line tool to measure the efficiency of your responsive image markup across viewport sizes and device pixel ratios.
JavaScript
401
star
20

snapper

A CSS Snap-Points based carousel (and lightweight polyfill)
JavaScript
361
star
21

jQuery-Visualize

HTML5 canvas charts driven by HTML table elements
JavaScript
353
star
22

a-font-garde

A variety of test cases and tools for safe font-icon usage.
JavaScript
292
star
23

jQuery-UI-Date-Range-Picker

A range picker built on top of jQuery UI's Datepicker Control
JavaScript
272
star
24

X-rayHTML

A little something to help build documentation pages.
JavaScript
258
star
25

AppendAround

A pattern for responsive markup
JavaScript
236
star
26

jqm-pagination

jQuery Mobile Pagination for touch, mouse, and keyboard
JavaScript
213
star
27

jQuery-Equal-Heights

This repository is unmaintained. Please see the included readme for more information.
JavaScript
206
star
28

formcore

A set of forms.
HTML
205
star
29

font-loading

Research on fonts
HTML
193
star
30

quickconcat

a simple dynamic concatenator for html, css, and js files, written in php
PHP
182
star
31

fixed-fixed

CSS position:fixed qualifier.
HTML
178
star
32

RWD-Nav-Patterns

Experimental navigation structure and behavior patterns based on progressive enhancement and responsive web design.
CSS
146
star
33

jQuery-Custom-File-Input

CSS-Friendly File Input
JavaScript
132
star
34

svg-to-png

Turn a folder full of SVGs into PNGs!
JavaScript
125
star
35

layersnap

Build SVG transitions simply and declaratively
JavaScript
110
star
36

woff2-feature-test

A simple feature test for the WOFF2 font format
JavaScript
107
star
37

RWD-Table-Patterns

This repository has been retired. Please see the readme below for more information.
JavaScript
105
star
38

scoped-media-query

An element query workaround. A Sass mixin for scoping CSS styles to apply only within given selector/media query pairs.
SCSS
104
star
39

EnhanceJS

Are you looking for the new "Enhance"? Try here https://github.com/filamentgroup/enhance
JavaScript
104
star
40

html-video-responsive

Explainer repo for a proposal to improve the responsive capabilities of the HTML video element
100
star
41

faux-pas

A script to highlight elements that are mismatched incorrectly to @​font-face blocks, which may result in shoddy faux bold or faux italic rendering.
HTML
99
star
42

jQuery-File-Download

One issue we have not yet seen addressed is the Ajax’s inability to receive a response in any form but text. Since it is now common for web applications to offer options for exporting your data in desktop app formats — such as .doc or .xls — we wrote a jQuery plugin to facilitate requests from the front end that result in a file for download. The plugin does not actually use Ajax, but its syntax follows the conventions of jQuery's native Ajax functions, making it a natural addition to our jQuery toolset.
JavaScript
98
star
43

enlarge

zoom a photo
JavaScript
91
star
44

cookie

Get, set, forget cookies!
JavaScript
91
star
45

elementary

A CSS workflow for mimicking element queries
JavaScript
87
star
46

porthole

Activate stuff when it's in the viewport
JavaScript
86
star
47

jQuery-Menu

Dropdown, iPod Drilldown, and Flyout styles with ARIA Support and ThemeRoller Ready
CSS
83
star
48

collapsible

Toggle your collapsible content
JavaScript
81
star
49

dialog

Just a simple, minimal jQuery dialog with typical interactivity
JavaScript
80
star
50

jQuery-Preload-CSS-Images

A solution that automates the age-old task of preloading images in web applications.
JavaScript
75
star
51

fg-modal

A modal web component
JavaScript
71
star
52

grumpicon

Grunticon Web App.
JavaScript
71
star
53

gulpicon

A gulp task wrapper for grunticon-lib.
Handlebars
67
star
54

jQuery-Custom-Input

Accessible, custom designed checkbox and radio button inputs styled with CSS (and a dash of jQuery)
HTML
63
star
55

checkboxradio

jQuery Plugin for progressively enhanced radio buttons and checkboxes
JavaScript
54
star
56

select

Minimally custom-styled select element
CSS
53
star
57

Revolver

A 360° panoramic photo viewer
JavaScript
50
star
58

resizeasaurus

A little utility to add resizing behavior to test intrinsically sized responsive components.
HTML
49
star
59

jQuery-Pixel-Em-Converter

jQuery Plugin for Retaining Scalable Interfaces with Pixel-to-Em Conversion
JavaScript
48
star
60

jQuery-Mobile-FixedToolbar-Legacy-Polyfill

Brings jQM Fixed Toolbar support to browsers that don't natively support position:fixed (like iOS4)
HTML
43
star
61

grunticon-lib

Stand-alone library for Grunticon
JavaScript
41
star
62

cq

A minimal container query web component
JavaScript
39
star
63

Overthrow-Sidescroller

The Sidescroller extension for Overthrow
JavaScript
37
star
64

jQuery-Mobile-Themed-DatePicker

This is jQuery UI's datepicker plugin with jQuery Mobile's theming and script handling applied.
HTML
36
star
65

auto-complete

A very small auto-complete component.
JavaScript
35
star
66

jQuery-Tree-Control

An accessible HTML tree component
JavaScript
34
star
67

jQuery-Slider

Accessible, custom slider widget based on a standard HTML select
JavaScript
34
star
68

directory-encoder

Takes a directory of images, turns it into some CSS.
JavaScript
33
star
69

anims

Just some CSS utilities for build and loop animations.
CSS
33
star
70

Accessible-jQuery-Tabs

A simple jQuery plugin for accessible tabs widget
HTML
30
star
71

face-off

This repository has been retired. Please see the readme below for more information.
HTML
29
star
72

Heart.js

A lightweight “ticker” plugin.
HTML
28
star
73

tau

Tau is a small and simple 360° gallery
JavaScript
26
star
74

Menu

jQuery Plugin for progressively enhanced menus
JavaScript
26
star
75

jQuery-Collapsible-Content

An accessible collapsible content panel plugin
JavaScript
25
star
76

directory-colorfy

Turn a folder of SVGs into a different color, quickly!
JavaScript
24
star
77

script-media-query

An @media (script) polyfill experiment
JavaScript
21
star
78

fg-carousel

An accessible carousel web component
JavaScript
18
star
79

Details

JavaScript
17
star
80

iconoclash

A workflow for configurable external svg sets.
JavaScript
14
star
81

iframe-caching

HTML
12
star
82

marquee

HTML
11
star
83

creditable

Utilities for working with credit card form input.
JavaScript
11
star
84

postcss-media-query-optimizer

A postcss plugin that will optimize your media queries.
JavaScript
10
star
85

servers-workers

Service Worker examples to be used at the CDN level.
JavaScript
9
star
86

component

just our typical auto enhance-able component skeleton
JavaScript
9
star
87

jqm-mail

An experimental responsive web app layout using jQuery Mobile controls
HTML
8
star
88

fg-collapse

An accessible collapsible web component
JavaScript
8
star
89

getmeta

get a meta tag's value by its name
JavaScript
8
star
90

3D-feature-test

Using progressive enhancement to apply 3D flip animation only to capable browsers
CSS
7
star
91

node-faux-pas

A command line utility to test a URL for faux web font rendering and mismatched web font code.
JavaScript
7
star
92

wc-experiments

web components and such
JavaScript
6
star
93

pym

A lightweight zoom library
JavaScript
4
star
94

validator

Form validation goodies
JavaScript
4
star
95

toss

A JavaScript function that scrolls any overflow container to a set of coordinates using an animated duration.
JavaScript
3
star
96

Trunca-

JavaScript
2
star
97

demo-head

Header for demo pages
CSS
2
star
98

compare-embed

HTML
1
star
99

flex-luthor

A small wrapper library to help with responsive intrinsic-sized Flexbox layouts that wrap based on content and container width and avoiding viewport-based media queries.
Nunjucks
1
star