Here are five things in the Frontend Engineering world, that I found interesting…

The Mindfulness of a Manual Performance Audit - Chip Cullen over on the always wonderful alistapart.com site says, “As product owners or developers, we probably have a good handle on which core assets we need to make a website work. But rarely is that the whole picture. How well do we know every last thing that loads on our sites?” A good read on frontend performance.

Announcing Storybook 3.0 - Storybook is a really cool UI playground that you can install via NPM, it’s great to test out React components outside of your codebase. They’ve gone 3.0 and that comes with Webpack 2 support among other features.

The Modern JavaScript Tutorial - Ilya Kantor created this cool site that says, “How it’s done now. From the basics to advanced topics with simple, but detailed explanations.” There are some good beginner resources out there for folks, this is a nice intro to advanced tutorial on JavaScript.

CSS in JavaScript: The future of component-based styling - Jonathan Z. White, a JavaScript Engineer at Airbnb writes on his Medium blog, “By adopting inline styles, we can get all of the programmatic affordances of JavaScript.” A good tutorial on the barebones way to do this in React, why it’s a good idea, and he sprinkles in some design tips which I don’t always see in JavaScript articles - I like that he did here.

Redux Logic Flow — Crazy Simple Summary - Trey Huffine on Medium writes, “It seems like every blog post about Redux is thousands of words when all that’s needed is a dead simple example of the logic process to refer to. Thus, I created this crazy simple summary.”

Progressive Web Apps

Going to talk a little about the history of JavaScript applications, and how we got here, and what tools you can use today to start developing Progressive Web Apps.

These applications are accessed via a web browser like other websites, but offer more dynamic interactions resembling native mobile and desktop apps.

Speed, time to interaction on the page. Twitter Lite, for example, is interactive in under 5 seconds over 3G on most devices. Most of the world is using 2G or 3G networks; a fast initial experience is essential.

Supports notifications

Desktop or native mobile app like experience in the browser

Responsive web design so appears like an app for any screens size

From a technical standpoint that means:

renders in the browser, and responds like more native apps

Served from a CDN (content delivery network), static content, and the shell of the application is cached

You can have your site work offline, and have background sync, and push notifications

The IndexDB API

Service worker is a programmable network proxy, allowing you to control how network requests from your page are handled.

As of 2015 hash-bang urls as they were called, or fragment urls, are out, you don’t need to do this, or use phantomjs to render the site for you at all. You can even use Google Search Console (Used to be called google webmaster tools) to preview how Google would see your site whether it’s a Single Page App or not.

SPAs in 2017

It’s really a new term that is coming to the forefront, and more web technologies being considered part of this new term. Mostly being pushed by Google.

PRPL is a pattern for structuring and serving Progressive Web Apps (PWAs), with an emphasis on the performance of app delivery and launch. Addy Osmani from Google is spear-heading this pattern, and is looking for feedback.

It stands for:

Push critical resources for the initial URL route.

Render initial route.

Pre-cache remaining routes.

Lazy-load and create remaining routes on demand.

Site works cross browser

Page transition don’t feel like they block on network

Each page has an URL

Exemplary Progressive Web App Checklist

Site’s content is index by Google

Schema.org metadata is provided when appropriate

canonical urls are provided when necessary

Pages use the History API; don’t use page fragments (#! hash bangs anymore)

What is the Future of Front End Web Development? - Chris Coyier on his CSS-Tricks takes a stab at what the future holds for us. I’d like to see more pieces like this from folks. Talking about the larger picture, thinking more deeply - and less about the new hotness.

Progressive Web Apps The Right Way - Cody Arsenault from the KeyCDN blog writes, “Since progressive web apps were introduced by Google back in 2015, they have been setting new standards for user experiences. While we are awaiting broader browser support, all developers should start learning how to take advantage of this exciting new way of building apps.” Good intro to progressive web apps, and how to build them.

Anecdotes about frontend and backend engineering - Malte Ubl, Tech Lead of the Google AMP project, describes a situation I’d found between the roles of ‘frontend’, ‘backend’, and ‘fullstack’ engineer. Starting up a new team, I remember how people get very attached to their titles, and technologies. In the end, we should all find places to be experts, to be kind, and communicate well.

Rearchitecting Airbnb’s Frontend - spoiler alert migrating a large codebase from Rails to SPA (single-page-app) based on React. Great talk of product side decisions, and performance for a SPA.

How we built Twitter Lite - more big players jumping into PWA (Progressive Web Apps) scene. Worth a read to see what they chose to use, and why.

Writing Tidy Code - from Harry Roberts (CSS Wizardry). Been following Harry for a long time, and he always has excellent advice. Love getting into the weeds like this one, in one’s craft. Some would argue that this is silly minutia, I would disagree. If you think of your job as your craft, these things matter.

What the heck is the event loop anyway? - speaking of your craft. Do you know how the JavaScript Event Loop works? If you’re one to think in terms of first principles, this is an excellent talk to watch. Philip Roberts talks about his journey in understanding this core part of JavaScript.

Preact.js - Fast 3kB alternative to React with the same ES6 API. If you’re looking for a VDOM implementation without all the abstraction, you must try this out. Been using it for a year or so, and have had many successes.

Show Notes

Dev Chrome Tools

Disclaimer: Chrome 58 is the version of Chrome/Dev Tools I used when doing this episode. If you are on the stable version of chrome - it’s updated roughly every two-three weeks for minor releases, and every 6 weeks for major releases. So ye be warned, what I may say, where things may be, etc, could change if you’re listening tooth’s in the future.

What is Chrome dev tools?

How do I access it?

Select More Tools > Developer Tools from Chrome’s Main Menu.

Right-click a page element and select Inspect.

Press Command+Option+I (Mac) or Control+Shift+I (Windows, Linux).

Getting Started

Three dots vertically stacked on top of each other.

Click on this menu and hover over the three icons that are shown to the right of ‘Dock side’.

Choose your poison, personal preference

sometimes choose right side, when going into device emulating for example, some people choose the pop out window

Elements

Right click select ‘inspect’

Styles panel (double click, and change any value).

Computed panel, (double click on the box model picture where there are values, you can change these!)

First thing at the top is a visual representation of the box model of the element you selected.

You can edit all the values around the box model!

Below the box model visual, is a list of the actual computed CSS properties, meaning after all the applied styles, these are the ones that ‘won’, and are applied to the element after the cascade.

You can click the ‘Show all’ checkbox, and it will even show you the browser-specific styles applied to the element in question. Meaning you can see what you may need to override to get the styles you want for that element.

Console

You can just start typing JS functions, things in global scope are here, and can be called

If jQuery is on the page you’re inspecting, for example, you can type $(‘selector’) and it will show that element in the console

Hit enter to do command

Multi line script you’re typing in? Hit shift+enter to go down a line, but not execute what you already typed in.

You are running in the context of the page of you’re on.

Type ‘document.body’ hit enter…it’s the html of the page, hover over things here in the console, and see those highlighted on the page

You can do things to the webpage here

document.body.style = ‘background: yellow’; will show the background of the page you’re looking at with yellow

Outputs are simply the static assets that Webpack spits out after processing. These are the things that the browser will load when you link to them in your project. In this case, just one JavaScript file would be loaded in the browser called ‘bundle.js’.