JavaScript

Francesco Ciannavei

JavaScript

JavaScript was my first language: I started in 2019 with the Discord API, and I've been writing it for {{yearsOfExperience}} years, on the frontend and, through Node.js, on the backend. I've worked with ES5 in legacy codebases as well as with the language's most recent features.

Two years of Magento 2 frontend

At TUN2U I spent two years on the frontend of Magento 2 stores, a very particular JavaScript ecosystem. I wrote RequireJS configurations, Magento's module loader, handling paths, shims and bundling strategies. And I developed many UI components in KnockoutJS, the MVVM framework built into Magento 2, with bindings, observables and the template system. Overall, almost all the JavaScript I wrote at TUN2U was jQuery, and almost none vanilla.

Asynchrony and performance

A lot of my JavaScript deals with asynchrony: the event loop, callbacks, Promises and async/await, with the patterns to avoid callback hell and race conditions. On rendering I watch reflows and repaints, use debouncing and throttling for high-frequency events, and native browser APIs like IntersectionObserver and MutationObserver when they're needed.

A library for pixel-based scaling

With CSS scale, a big button grows more than a small one. I wrote JS-Lib-Scale to make them all grow by the same number of pixels, and the links in this site's header use it. It's explained in its own article.

TypeScript at the edge

The CDN that resizes and converts this site's images is a Cloudflare Worker I wrote in TypeScript: it's told on the Cloudflare page.

This site's frontend

The site you're reading has its frontend in Astro, and I've had two pull requests merged in the Astro ecosystem: both stories are on the Astro page. For tooling I use Webpack, Babel, ESLint and Jest for tests.

Where I started

My first programs were Discord bots in Node.js, and they taught me to write code that stays online and reacts to events.

Rating
9/10

Where i've used it: