Dublin Library

The Publishing project

What is the islands architecture?

Islands architecture is a modern web development paradigm that emphasizes delivering static HTML content while selectively hydrating interactive components. This approach mixes interactive "islands" of JavaScript within a "sea" of static HTML, optimizing performance and user experience by drastically reducing the amount of JavaScript the client must load and execute. Instead of sending a massive JavaScript bundle to the browser on the initial page load, the server sends only the HTML and CSS. The browser then loads the JavaScript exclusively for the interactive elements precisely when they are needed. This post explores the concept of islands architecture, its historical context,...

Memory Safety In C, Rust And Go

Memory safety has become a critical concern in modern software development. The Cybersecurity and Infrastructure Security Agency CISA has published two advisories underlining the urgency of addressing memory safety vulnerabilities in widely used software components. In 2023, they published The Urgent Need for Memory Safety in Software Productshttps://www.cisa.gov/news-events/news/urgent-need-memory-safety-software-products, followed by Memory Safe Languages: Reducing Vulnerabilities in Modern Software Developmenthttps://media.defense.gov/2025/Jun/23/2003742198/-1/-1/0/CSIMEMORYSAFELANGUAGESREDUCINGVULNERABILITIESINMODERNSOFTWAREDEVELOPMENT.PDF in 2025. Languages like C, while powerful and performant, leave memory management entirely in the hands of the programmer. This manual control frequently leads to vulnerabilities such as buffer overflows, memory leaks, and use-after-free errors. In contrast, modern languages like Go...

Using Iterator Helpers

Modern JavaScript development often defaults to chaining array methods like .filter, .map, and .reduce. While these methods offer great readability and a declarative style, they suffer from a significant performance drawback known as eagerness. When you chain .filter.map, JavaScript creates a complete intermediate array after the filter operation before it even begins mapping. If you only need the first five results from a list of ten thousand, an eager approach still processes all ten thousand items twice—once to filter them and once to map the results. This results in unnecessary CPU cycles and increased memory pressure as the engine allocates...

Understanding Content Security Policy (CSP)

Content Security Policy CSP is an added layer of security that helps detect and mitigate certain types of attacks, including Cross-Site Scripting XSS and data injection attacks. Attackers use these exploits for everything from data theft to site defacement to the distribution of malware. This guide explains how to design a CSP, the core directives you can use, and how to implement your policy effectively on Netlify. How CSP works To enable CSP, configure your web server to return the Content-Security-Policy HTTP header. Alternatively, you can use the <meta> element to configure a policy. For example: <meta http-equiv="Content-Security-Policy" content="default-src 'self';...

load .env file in Node.js natively

Node.js 20.12.0 introduced a native way to load environment variables from a .env file using the loadEnvFile function from the node:process module. This is a great addition because it eliminates the need for third-party libraries like dotenv for this common task.This post will discuss how to use the loadEnvFile function to load environment variables from a .env file in your Node.js applications. It will also cover some limitations and workarounds for the function. Using loadEnvFile The basic usage is simple. Use the loadEnvFile function to load environment variables. The function takes an optional parameter that specifies the path to the...

New Features in CSS Multi-Column Layout

A significant limitation of CSS multi-column layouts has been the restricted control over content flow between columns. While developers can set the number of columns, their width, and the gaps between them, controlling how content breaks and wraps remains a challenge. Previously, the primary way to influence multi-column behavior was to set a fixed height on the parent container. This approach is often impractical because content might not fit within a specified height, causing columns to overflow the container. This post covers two features in the CSS Multi-Column Layout Module Level 2 specification that address these limitations: column-height and column-wrap....

URL Pattern API: A Native Standard for Routing

The URL Pattern API provides a standardized, native way to match URLs against specific patterns. It brings the pattern-matching capabilities found in server-side frameworks such as Express or client-side routers such as React Router directly into the browser and Node.js runtimes. This post explains the functionality of the URL Pattern API, the external tools it replaces, and why it provides a superior alternative for URL matching and routing in modern web development. How it works The API revolves around the URLPattern class. Developers can define patterns using either a compact string or a structured object, which the API then matches...

Deep Dive - Chrome Origin Trials

Origin Trials allow you to test and provide feedback on new or experimental web APIs before they become a permanent part of the web platform. Chromium-based browsers—such as Chrome, Edge, and Opera—use this program to test features in production environments without committing to a permanent implementation. This post explores how Origin Trials function, their built-in safety mechanisms, and best practices for implementing them in your projects. Preventing "Burn-in" In the early days of the web, browsers used vendor prefixes such as -webkit- or -moz- to test new CSS properties. This created a "burn-in" effect: developers built millions of production sites...

Understanding the W3C Recommendation process

The W3C Recommendation process defines the lifecycle of a web technology proposal. This process involves multiple stages of review, feedback, and implementation to ensure new features are robust, interoperable, and beneficial to the web ecosystem. This post breaks down each stage of the process, explains the implications for developers, and provides guidance on navigating the evolving landscape of web standards. Why the process matters Understanding this process helps developers decide when to adopt new web technologies. Early adoption carries the risk of building on unstable APIs that might change or be abandoned. Conversely, waiting for final recommendations might result in...

globalThis in JavaScript

globalThis is a universal accessor for the global object in JavaScript. It provides a reliable, standard way to access global variables and functions regardless of the environment executing the code. This post explains the purpose of globalThis, how it unifies access to the global scope across different JavaScript environments, and how to use it effectively in JavaScript and TypeScript projects. It also covers polyfilling globalThis for legacy environments. Purpose and functionality Before globalThis, the global object had different names depending on the runtime environment. Code designed to run in multiple environments—such as isomorphic libraries or cross-platform utilities required complex workarounds...