JavaScript

JavaScript Start-Up Performance

Addy Osmani:

Smaller JavaScript bundles generally do result in a faster load time (regardless of our browser, device & network connection) but 200KB of our JS !== 200KB of someone else's and can have wildly different parse and compile numbers.

Using file size as a metric isn't an awful crime, because it does matter, but it's only part of the JavaScript performance story.

I also found the overview of the discussion of bytecode interesting. Browsers download JavaScript, parse it, turn it into an abstract syntax tree, then turn that into bytecode. What if we could do that during our build steps and ship bytecode?

My opinion is shipping bytecode can increase your load-time (it's larger) and you would likely need to sign the code and process it for security. V8's position is, for now, we think exploring avoiding reparsing internally will help see a decent enough boost that precompilation may not offer too much more, but are always open to discussing ideas that can lead to faster startup times.

Intro to Vue.js: Animations

This is the fifth part in a five-part series about the JavaScript framework, Vue.js. In this last part of the series, we'll cover Animations (if you know me at all, you probably knew this was coming). This is not intended to be a complete guide, but rather an overview of the basics to get you up and running so you can get to know Vue.js and understand what the framework has to offer.

(more…)

Intro to Vue.js: Vuex

This is the fourth part in a five-part series about the JavaScript framework, Vue.js. In this part, we'll cover Vuex for state management. This is not intended to be a complete guide, but rather an overview of the basics to get you up and running so you can get to know Vue.js and understand what the framework has to offer.

(more…)

The Promise of a Burger Party

Mariko Kosaka with an elaborate and wonderful metaphor.

What is a Promise in JavaScript? It's like if you go to a restaurant and order a burger and a shake. The restaurant needs to prepare your food, so after you pay, you get a tray with a buzzer on it. The tray is the Promise.

Intro to Vue.js: Rendering, Directives, and Events

If I was going to sum up my experiences with Vue in a sentence, I’d probably say something like "it's just so reasonable" or "It gives me the tools I want when I want them, and never gets in my way". Again and again when learning Vue, I smiled to myself. It just made sense, elegantly. This is my own introductory take on Vue. It's the article I wish I had when I was first learning Vue. If you'd like a more non-partisan approach, please visit Vue's very well thought out and easy to follow Guide.

Get Started with Debugging JavaScript in Chrome DevTools

Kayce Basques wrote an excellent interactive tutorial that explores how to debug JavaScript with DevTools. Kayce looks into a number of techniques and options that I was completely unaware of and, as he notes in the beginning of the tutorial, if you’re still using console.log to find bugs in your code (like me) then this article is written just for you (also me).

icon-closeicon-emailicon-linkicon-logo-staricon-menuicon-searchicon-staricon-tag