Architecture Deep Dive

Visual comparison of architectural patterns, rendering strategies, data flow, and infrastructure between PHP and Next.js.

Server-Side Rendering (SSR Only)

PHP
1
Browser Request
2
Apache/Nginx receives request
3
PHP interprets .php file
4
SQL queries to MySQL
5
PHP renders full HTML string
6
Complete HTML sent to browser
7
Browser parses HTML, loads CSS/JS
8
Full page reload for navigation

Every request generates a complete HTML page on the server. Navigation triggers full page reloads. No client-side rendering or hydration. Interactivity requires separate JavaScript files that manipulate the DOM directly.

Hybrid Rendering (SSR + CSR + SSG + Streaming)

Next.js
1
Browser Request
2
Edge Middleware (auth, redirect)
3
Server Component renders on server
4
Prisma queries (type-safe)
5
HTML streamed progressively
6
Client Components hydrate
7
SPA navigation (no full reload)
8
Server Actions for mutations

Next.js uses multiple rendering strategies: Server Components for data-heavy pages, Client Components for interactivity, Static Generation for cacheable content, and Streaming SSR for progressive loading. Navigation is client-side without full page reloads.