Artikelen over JavaScript

Artikelen over JavaScript

JavaScript

The bullshit of code coverage

A test suite can reach 100% coverage and still charge the wrong shipping fee or take a payment twice. Through boundary cases, misleading mocks and missing requirements, I examine what coverage actually proves. The useful question is not whether the code ran, but whether the tests would catch the mistakes your customers care about.

Continue reading

10 JavaScript one-liners every developer should know

Ten small JavaScript helpers, with examples of their inputs, outputs and limits. From removing duplicate values and delaying a task to debouncing and comparing arrays, these one-liners solve familiar problems. The point is readable, useful code: a short expression earns its place only when it makes the behaviour easier to understand.

Continue reading

The difference between debounce and throttle

Debounce waits for a pause; throttle limits how often work can run while events keep arriving. That difference matters for search fields, scrolling and other frequent interactions. This article explains both techniques with practical use cases, helping you choose the behaviour your interface needs rather than treating them as interchangeable performance tricks.

Continue reading

The bullshit of frontend development

The bullshit of frontend development

Frontend tooling was supposed to help us deliver. So why do straightforward websites turn into months of work? Drawing on my experience, I challenge unnecessary frameworks, custom abstractions and premature optimisation, and ask where accessibility and our users went in the process.

Continue reading

My 3 favourite console methods in JavaScript

The browser console has more to offer than a stream of log messages. I share three useful JavaScript methods: console.log, console.dir and console.table. The examples cover inspecting objects, presenting arrays as tables and selecting columns, plus a subtle debugging trap: an object shown in the console may have changed since you logged it.

Continue reading

Vue components vs directives

Components and directives both support reuse in Vue, but they solve different problems. Using a counter and a focus directive, this article shows when to package a piece of interface and when to attach behaviour directly to an element. It also explains the Vue 2 directive hooks and why clear responsibilities matter more than simply reusing code.

Continue reading

Vue components disappear in AEM

Vue components disappear in AEM

Editing a component in AEM can replace its HTML without restarting Vue, leaving the component invisible in the editor. This article walks through the integration problem and a custom refresh approach, including iframe handling, to keep Vue components working during authoring.

Continue reading

Communication between Vue components

How should Vue components share data without becoming tightly coupled? This article compares props and events, the Vue 2 .sync modifier and an event bus, alongside the pitfalls of reaching directly into parent or child instances. The aim is to make communication explicit while keeping components understandable and reusable.

Continue reading

Starten met unit testen in Vue

Frontendlogica in Vue kun je ook met unit tests controleren. Aan de hand van een klein component bouwen we een test op met Jasmine en Karma: het component laden, afzonderlijk gedrag herkennen en testgevallen kiezen. Daarbij kijken we naar verschillende invoerwaarden en grenzen, zodat de test meer doet dan alleen de code uitvoeren.

Lees verder