liveBook · Manning

Chapter 2: Understanding the web platform

What you will learn in chapter 2 of Vanilla Web

The chapter introduction argues that the web platform is powerful by default, even though a focus on libraries and frameworks can obscure its advantages.

After this chapter you will be able to

Section by section

Introduction

The chapter introduction argues that the web platform is powerful by default, even though a focus on libraries and frameworks can obscure its advantages.

Key terms: web platform, Vanilla Web, libraries, frameworks

2.1 Building blocks

This section explains why web standards provide a stable foundation for Vanilla Web applications compared with versioned frameworks.

Key terms: web standards, backward compatibility, Vanilla Web, interoperability, specifications

2.1.1 Rendering engines

The section explains how rendering engines run Vanilla Web code across browsers, installed apps, embedded views, and emerging AI-driven environments.

Key terms: rendering engines, Blink, WebKit, Gecko, feature detection, progressive enhancement, browser, rendering engine, execution engine, JavaScript runtime

2.1.2 Network protocols

This section explains how Vanilla Web apps use native browser networking, from URL boundaries and HTTPS to real-time and peer-to-peer communication.

Key terms: Vanilla, HTTPS, WebSockets, WebRTC, native APIs, URL, protocol, host, port, origin

2.1.3 Web security

Explains the browser-enforced security foundations of web apps and the developer practices that work with them.

Key terms: sandbox, Same-Origin Policy (SOP), origin, CORS, CSP, Secure Contexts, Trusted Types, COOP/COEP, permission model, permissions

2.1.4 Application architecture

This section explains the navigation, rendering, and user interface engine choices made when starting a Vanilla Web project.

Key terms: multi-page application (MPA), single-page application (SPA), client-side, custom routing system, Static Site, Static Site Generation (SSG), Client-Side Rendering (CSR), Server-Side Rendering (SSR), Universal Rendering, hydration

2.1.5 HTML, CSS, and JavaScript

This section explains the roles of HTML, CSS, and JavaScript in a Vanilla project and introduces WebAssembly as an optional complement for demanding computation.

Key terms: semantic HTML, CSS layer, JavaScript, ECMAScript modules, WebAssembly, Wasm, WebAssembly API

2.2 Design Patterns

The section explains why Vanilla Web projects need deliberate design-pattern choices and introduces patterns for adaptable layouts, broad compatibility, reusable components, and installable apps.

Key terms: design pattern, Vanilla project, Responsive Web Design (RWD), Adaptive Design (AD), Progressive Enhancement (PE), feature detection, Web Components, Progressive Web Apps (PWA)

2.2.1 Web APIs

This section introduces native Web APIs and explains how to choose them using compatibility checks and Baseline status.

Key terms: Web APIs, browser APIs, Vanilla mindset, stable APIs, experimental APIs, progressively enhance, feature detection, gracefully degrade, Baseline, Newly available

2.3 The power of Vanilla Web

This section explains why Vanilla Web’s fewer layers can give developers more control and a simpler way to reason about an app.

Key terms: Vanilla Web, dependencies, fewer layers, HTML, CSS, JS, mental model

2.3.1 Web performance

Explains why well-designed Vanilla sites can perform well, how raw UI benchmarks compare them with frameworks, and how Core Web Vitals measure user-facing performance.

Key terms: JS Framework Benchmark, vanilla DOM implementation, diffing and reconciliation, Web Vitals, Core Web Vitals, Largest Contentful Paint (LCP), Interaction to Next Paint (INP), Cumulative Layout Shift (CLS), effective design patterns, semantic HTML

2.3.2 Accessibility

This section explains why Vanilla Web can make accessibility the default by using meaningful native HTML and testing the result.

Key terms: a11y, semantic HTML, ARIA attributes, focus management, accessibility first, div soup, fundamental accessibility tools

2.3.3 Distribution

This section explains why URLs make Vanilla Web apps easy to distribute and why URL design matters to users.

Key terms: distribution, URL, Vanilla project, deep link, Text Fragments, UX, QR codes, NFC tags

2.3.4 Discardability

Explains why web apps are easy to try and discard, and why developers should design for brief or one-time use.

Key terms: discardability, commitment barrier, ephemeral usage, fast loading, stateless design, progressive enhancement

2.4 Modern web apps

This section establishes that Vanilla Web projects can build modern web apps without a framework.

Key terms: modern web apps, Vanilla projects, framework, installable, offline-capable

2.4.1 Installability

This section explains how installability lets a Vanilla Web app appear on a home screen or desktop, chiefly through a Web App Manifest.

Key terms: installability, Web App Manifest, secure origin, Install, Service Workers, native-like launch experience

2.4.2 Offline support

This section explains how Service Workers support offline behavior in Vanilla apps and why graceful offline behavior matters to users.

Key terms: Service Worker, network requests, cache assets, fallback pages, static assets, background sync, stale-while-revalidate, offline, UX, fails gracefully

2.4.3 Data Storage

This section matches browser storage options to different kinds of data and warns that client-side storage needs a recovery plan.

Key terms: Local Storage, Session Storage, IndexedDB, Cache API, File System Access API, Cookies, developer tools, quotas, eviction policies, Storage API

2.4.4 Internationalization

This section explains what the browser’s internationalization APIs handle, where content translation requires additional resources, and what practical work remains for a multilingual app.

Key terms: Intl, internationalization APIs, Unicode-aware HTML and CSS, content translation, translation dictionary, Translation API, locales, RTL layouts, Intl.PluralRules

2.4.5 Capabilities API

This section explains that permission-gated browser APIs give Vanilla JavaScript access to device capabilities once associated with native apps.

Key terms: Capabilities APIs, permissions, Vanilla JS, web API

2.4.6 Client-side AI

This section explains how Vanilla Web apps can run AI in the browser, why that can be useful, and the current limits of built-in AI APIs.

Key terms: client-side AI, machine learning models, API surface, inference, Vanilla developers, Summarizer, Prompt API, Chromium browsers, Baseline

2.5 Developer experience

This section explains how Vanilla Web development can use familiar tools, optional local-development conveniences, and optional quality checks without requiring a build process.

Key terms: Vanilla Web, web view, local server, live-reload, browser developer tools, Workspace, build tools, source code, lightweight toolchains, ESLint

2.5.1 Simple and more secure organization

This section explains how Vanilla Web can simplify project organization while reducing dependency-related security and maintenance risks.

Key terms: Vanilla Web, project structure, style guidelines, dependencies, dependency tree, browser’s native implementations, backward-compatibility

2.5.2 Interoperability with libraries and frameworks

The section explains how Vanilla Web lets developers add libraries and frameworks selectively, while modern frameworks are adopting more platform-like approaches.

Key terms: Vanilla Web, framework-agnostic, vendor, ecosystem, a la carte flexibility, Chart.js, WebGL, Alpine.js, server-side rendering (SSR), static site generation (SSG)

2.5.3 Cost reduction

This section explains how a vanilla approach can lower business costs and overhead.

Key terms: vanilla approach, dependency updates, static files, CDN, minimal overhead

2.5.4 Reduced Complexity Tax

This section explains how Vanilla Web reduces the complexity tax by keeping dependencies, server choices, build tools, and package managers optional rather than making them prerequisites.

Key terms: complexity tax, node_modules, build chain, web standards, server-side simplicity, client JS, portable, build step, build tools, build pipeline

2.5.5 Deploying the apps

A Vanilla Web frontend can be deployed by sending its files to a web server, without a Vanilla-specific server or deployment tool.

Key terms: Vanilla Web, web server, deployment tool, frontend

2.6 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 1: Hello Vanilla Web Chapter 3: The user interface →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.