Web Technologies 2026 · BiUH · Lesson 6

Frameworks

What they are · why they exist · server and client · which ones · why we use Vue

webtech.landrock.io

Six questions, in order

What this deck covers.

What is a framework?and how it differs from a library
Why do we need one?the real problem — and when we don't
Where does the code run?your laptop, the server, the browser
Which ones exist?a short history and today's field
How do they compare?the same button, four times
Why Vue?Evan You, and the ecosystem we will use

The second deck today — Vue · Getting Started — is the hands-on part.

Lesson 4, the header and the footer

You have already
built part of a framework.

nav.html, six lines of fetch, and every page got the same header. One piece, defined once, used everywhere.

That is a component — the first idea every framework is built on. We said then: "Frameworks are largely this idea, made faster and safer." Today we find out what the rest is.

The one distinction worth remembering

You call a library. A framework calls you.

Library

A toolbox. You decide the plan, and pick up a tool when you need it.

jQuery, a date library, a chart library.

Your code is in charge.

Framework

A floor plan. The rooms are decided — you fill them in.

Vue, React, Angular, Svelte.

The framework is in charge. It runs your code when it decides it is time.

The jargon for this is "inversion of control". The floor plan is the useful picture.

So what is a framework, really?

Somebody else's decisions about how an app is built — made before you start.

Every decision made for you is one you can no longer make differently.

Why they exist

Drawing the page is easy.
Keeping it right is the hard part.

The data changes. Every place on the screen that shows it has to change too — every time, without exception.

A like button, in plain JavaScript

Three places show the number. You update all three.

let likes = 0;

button.addEventListener('click', () => {
  likes++;
  button.textContent = '♥ ' + likes;     // the button
  badge.textContent  = likes;              // the counter in the header
  document.title     = likes + ' likes';  // the browser tab
  // a fourth place next month? forget it here, and the screen lies
});

You tell the browser how to change, step by step. Fine for one button — a shop with a cart, a filter and a login has hundreds.

The same button, in Vue

Describe the result. Vue keeps it true.

<script setup>
import { ref } from 'vue'
const likes = ref(0)
</script>

<template>
  <button @click="likes++">♥ {{ likes }}</button>
  <span class="badge">{{ likes }}</span>
</template>

ref(0) makes a value Vue watches. Change it, and every {{ likes }} updates. A fourth place is one more {{ likes }}.

This is reactivity — the second idea every framework is built on.

Two ways of telling a computer what you want

Directions, or an address.

Imperative

"Left at the lights, second right, stop after the bank."

Plain DOM code: you give every step. One wrong turn and you arrive somewhere else.

Declarative

You type the address into DiDi. The driver works out the route.

Vue: you say what the screen should show. Vue works out which parts of the page to change.

HTML and CSS were always declarative. Frameworks make JavaScript feel the same.

What you get

Five things a framework gives you.

Componentsa page built from pieces you write once — your nav.html, done properly
Reactivitychange the data, the screen follows
Routingmany pages, one app — no full reload between them
Toolinga dev server, instant reload, a build that makes files small
Conventionseveryone puts things in the same places — teammates and the AI can read your code

What it costs — be honest about this

Nothing here is free.

A build stepyour files no longer run as written — a tool translates them first
Many packagesa fresh Vue project downloads about 175 packages — code from many strangers — into node_modules
More JavaScriptevery visitor's phone downloads and runs the framework too — about 90 KB before your own code
Changeversions move, examples on the internet go out of date — so does the AI
One more layerwhen it breaks, you need HTML, CSS, JS and the framework to find out why

The part most tutorials leave out

A four-page website
does not need a framework.

A framework earns its place when there is state: data that changes, is shown in many places, and is shared between pages.

Being able to say "I did not use one, and here is why" is a good answer in your project presentation.

Practise the decision

Framework — yes or no?

The siteFramework?
A portfolio: four pages, text and photosNo — HTML and CSS are the right tool
A restaurant: menu, opening hours, mapNo — unless the menu changes daily from a database
Your quote collection with search, likes, filtersMaybe — this is where it starts to pay
A shop with a cart that follows you across pagesYes — shared state is the whole job
A dashboard, a chat, a gameYes — the screen changes constantly
A WeChat Mini ProgramYes — and Vue can build one (more later)

The question from "What the Web Is", one more time

Where does the work happen?

Frameworks are where this question stops being history and becomes a setting in a config file. So we answer it properly.

Not two places — three

Where your code runs.

Build time

Your laptop

Vite turns .vue files into plain .js and .css.

Happens once, before anyone visits.

Who sees it: only you

→
Request time

The server

Answers each request. Reads the database, checks passwords, makes or sends HTML.

Node, PHP, Python, Java…

Who sees it: nobody outside

→
Run time

The browser

Runs your JavaScript. Clicks, state, changes to the page.

On a phone you have never seen.

Who sees it: everyone

"Client" is the browser. "Server" is the machine that answers. The build is the one people forget.

So what belongs where?

Server or client.

On the server

  • passwords, API keys, secrets
  • the database
  • checking who you are
  • anything every user shares
  • sending email, taking payment

In the browser

  • reacting to clicks and typing
  • showing and hiding things
  • form hints while you type
  • what only this user sees, right now
  • animation, scrolling, drag and drop

Rule of thumb: if it must be trusted, it happens on the server. If it must be fast, it happens in the browser.

The security rule that follows

Everything you send
to the browser is public.

The AI will happily put a secret key in client code if you ask it to "just make it work". This is where you say no.

Somebody has to turn data into HTML

Four ways to make the page.

Static

SSG · built once

The HTML exists before anyone asks. The server just sends files.

Your four pages. Fast, cheap, nothing to break.

Server-rendered

SSR · per request

The server builds the HTML for each visitor, from the database.

PHP in 2005. Nuxt and Next.js today.

Client-rendered

CSR · SPA

The server sends an empty page and a JavaScript file. The browser builds everything.

A fresh Vue project, by default.

Hybrid

SSR + hydration

The server sends finished HTML. Then JavaScript wakes it up and takes over.

The course website works like this.

"SPA" means single-page application: one HTML page, and JavaScript swaps what is inside it.

The same page, delivered two ways

What actually arrives in the browser.

Static or server-rendered

<body>
  <header>…</header>
  <main>
    <h1>Quotes</h1>
    <article class="quote">
      <blockquote>…</blockquote>
    </article>
    <!-- all twenty -->
  </main>
</body>

Client-rendered

<body>
  <div id="app"></div>
  <script type="module"
    src="/assets/index-4f2a.js">
  </script>
</body>

<!-- that is all. JS builds -->
<!-- everything you see.  -->

What an empty page costs

Client-rendered has a price.

That is why server rendering came back — and why Nuxt exists.

Remember your Open Graph image from the project deck? A WeChat link preview reads the HTML. It does not wait for your JavaScript.

Try it now · two minutes

View source vs Inspect.

View source
Ctrl+U · Mac ⌥⌘U
what the server sent — before any JavaScript ran
Inspect → Elements
F12 · Mac ⌥⌘I
the page as it is now — after JavaScript changed it

Compare both on your own site, then on webtech.landrock.io. Where do they differ?

Your nav.html header is a small client-rendered part: in View source the <header> is empty. In Elements, it is full.

The site you open every week

This course website is a Vue app.

<a v-for="l in materials.lessons" :href="l.href">
  {{ l.title }}
</a>

Server-rendered for speed and link previews, Vue in the browser for everything you click. That is the hybrid.

The pendulum, again

Where the work happens moved twice.

1995Server. Perl, then PHP builds every page. The browser only displays.
2005A little client. Ajax: Gmail and Google Maps update without reloading.
2010sClient. Single-page apps: Angular, React, Vue. The server only sends data.
2016+Both. Next.js, Nuxt: render on the server, wake up in the browser.
2020sEdge. The server moves close to the user — sometimes into the same city.

Every swing solved the last one's problem. None of them is "correct" — each is a trade.

One more piece you need today

Node.js — JavaScript leaves the browser.

2009, Ryan Dahl took the JavaScript engine out of Chrome and made it run on any computer.

It can be the server

The same language on both sides. Nuxt and Next.js servers are Node.

It runs the tools

Vite, npm, the build — all Node. Even a site with no server needs Node on your laptop.

In the 2025 Stack Overflow survey, Node.js was the most used web technology of all — 48.7% of developers.

Twenty years in eight lines

Where frameworks came from.

2006jQuery · John Resig — a library that made every browser behave the same
2010AngularJS · Google — the first big framework
2013React · Facebook — components, and the "virtual DOM"
2014Vue · Evan You — one person's side project
2016Angular rewritten · Svelte · Rich Harris · Next.js · Nuxt
2020Vite · Evan You again — the build tool almost everyone now uses
2021Astro for content sites · SolidJS 1.0
2026the big four still stand — and they look more alike every year

The field today

The big four.

React

Meta · 2013

The most used by far. Writes HTML inside JavaScript (JSX).

Huge job market. Many ways to do everything.

Vue

Evan You · 2014

HTML templates you already know. Gentle to learn, complete ecosystem.

Very strong in China.

Angular

Google · 2016

Everything built in, one right way. TypeScript required.

Banks, big companies, big teams.

Svelte

Rich Harris · 2016

A compiler: the framework mostly disappears at build time.

The one developers most enjoy.

Also: Solid · fast, React-like Preact · React in 4 KB Astro · content sites, little JS Qwik · loads almost nothing Alpine, htmx · sprinkle on HTML

A framework draws the page. A meta-framework also decides where.

Each one has a big sibling.

FrameworkMeta-frameworkWhat it adds
ReactNext.jsa server · server rendering · pages from files and folders · API routes · one command to deploy
VueNuxt
SvelteSvelteKit
Angularbuilt in · Analog

Start with the framework. Reach for the meta-framework when you need a server or link previews — not before.

Stack Overflow Developer Survey 2025 · "which did you use this year?"

How many developers use each.

React44.7%
Angular18.2%
Vue17.6%
Svelte7.2%
Next.js20.8%
Nuxt4.0%
jQuery23.4%

A worldwide, mostly Western, English-speaking survey. In China, Vue’s share is far higher. jQuery is mostly old code nobody has rewritten.

The fairest comparison there is

The same like button, four times.

import { useState } from 'react';

export default function Likes() {
  const [likes, setLikes] = useState(0);
  return (
    <button onClick={() => setLikes(likes + 1)}>
      ♥ {likes}
    </button>
  );
}
<script setup>
import { ref } from 'vue'
const likes = ref(0)
</script>

<template>
  <button @click="likes++">
    ♥ {{ likes }}
  </button>
</template>
<script>
  let likes = $state(0);
</script>

<button onclick={() => likes++}>
  ♥ {likes}
</button>
import { Component, signal } from '@angular/core';

@Component({
  selector: 'app-likes',
  template: `
    <button (click)="likes.update(n => n + 1)">
      ♥ {{ likes() }}
    </button>`,
})
export class Likes {
  likes = signal(0);
}

Same idea in all four: a value, a button, a click that changes it. Only the spelling differs.

Side by side

How they differ.

ReactVueAngularSvelte
Backed byMetaindependent team, sponsorsGoogleVercel employs its creator
You writeHTML inside JS (JSX)HTML templates + JSHTML templates + TypeScript classesHTML + JS, compiled
Size of the ideasmall core, choose the restcore + official router, state, buildeverything includedsmall, compiler does the work
Learning curvemediumgentlesteepgentle
Server siblingNext.jsNuxtbuilt inSvelteKit
Mobile appsReact Nativeuni-app, CapacitorIonicCapacitor
Updates the page bycomparing a virtual copytracking what changedsignals + change detectioncode the compiler wrote

What the comparison actually shows

They are converging.

Components. A reactive value — ref, $state, signal, useState. A compiler. A server sibling. All four now.

The differences left are taste, ecosystem, and who pays for it.

Learn one well. The second one takes a week — because the ideas are the same.

A question worth asking of any tool

Who pays for it?

ReactMeta — built for Facebook and Instagram, and steered by their needs
AngularGoogle — used inside Google, on Google's schedule
Sveltea community project; Vercel, a hosting company, pays its creator
Vueno single company — an independent core team, paid by sponsors and companies that use it

"On someone else's land", from the Web 2.0 slide, applies to your tools too. Nobody can switch Vue off by changing strategy.

The decision for this course

We use Vue.

First, the person behind it.

The person behind it

尤雨溪
Evan You
from Wuxi, Jiangsu
studyArt and art history in the US, then design and technology at Parsons, New York — not computer science
jobGoogle Creative Lab: prototypes in the browser, built with AngularJS
2014releases Vue — a side project — on GitHub
2016goes independent: Vue becomes his full-time job, paid for by sponsors
2020writes Vite, now the build tool behind React and Svelte projects too
2024founds VoidZero, a company for the JavaScript toolchain

“I figured, what if I could just extract the part that I really liked about Angular and build something really lightweight.” — Evan You, on why he started

Why Vue, for this course and this room

Six reasons.

The pieces, and the job each one does

The Vue ecosystem.

The coreVuecomponents and reactivity
Build & dev serverViteturns .vue into .js, reloads instantly
PagesVue Routerwhich URL shows which component
Shared statePiniadata many components need — a cart, a login
Server & full siteNuxtserver rendering, pages from folders
DebuggingVue DevToolssee components and their data live
EditorVue (Official)the VS Code extension for .vue files
TestingVitestchecks your code automatically
Docs sitesVitePressthe Vue docs themselves are built with it

Today: Vue, Vite, Vue Router, DevTools, the extension. Pinia and Nuxt when a project needs them.

Built here, used everywhere

A lot of the Vue ecosystem is from China.

Element Plusready-made buttons, forms, tables — started at Ele.me
Vantcomponents for mobile pages — from Youzan
Ant Design VueAnt Group's design system, rebuilt for Vue by the community
Naive UIa complete component library, Chinese-led
uni-appone Vue codebase → WeChat Mini Program, Alipay, Douyin, Android, iOS and the web

The WeChat Mini Programs from "What the Web Is" — many of them are written in Vue, through uni-app.

Take these with you

The lessons.

Next: Vue · Getting Started →

← → navigate · F fullscreen · P print · Copy never turns the page