The NOVA LAB Command Center must deliver information as quickly as possible. Different rendering strategies are like different communication systems on the station β each has its advantages depending on the situation.
A traditional Vue application is an SPA (Single Page Application):
1Server β [empty HTML + JS bundle] β Browser β [rendering]SPA Advantages:
SPA Disadvantages:
SSR renders the page on the server and sends ready HTML:
1Request β Server [renders HTML] β Browser [displays + hydration]SSR Advantages:
SSR Disadvantages:
SSG generates HTML at build time:
npm run build β each page is prerendered to HTML1Build time β [generates HTML] β Deploy β CDN β BrowserSSG Advantages:
SSG Disadvantages:
ISR combines SSG and SSR β pages are generated statically but can refresh:
1Request β [cache/CDN] β if stale β regenerate in background β new versionISR Advantages:
ISR Disadvantages:
Hydration is the process where Vue "takes over" the static HTML generated by the server and adds interactivity to it:
1Server: <button>Click</button> β static HTML
2 β hydration
3Client: <button @click="handler">Click</button> β interactiveVue compares the virtual DOM with the existing HTML and attaches event handlers, refs, and reactivity β without re-rendering the entire DOM.
| Strategy | Use when... | |----------|-------------| | SPA | The app requires rich interactivity (dashboard, editor) | | SSR | SEO matters + dynamic data (store, blog with comments) | | SSG | Content changes rarely (documentation, landing page) | | ISR | Content changes, but not in real time (blog, catalog) |