Architecture
Architecture Deep Dive
Visual comparison of architectural patterns, rendering strategies, data flow, and infrastructure between PHP and Next.js.
Server-Side Rendering (SSR Only)
PHP1
Browser Request2
Apache/Nginx receives request3
PHP interprets .php file4
SQL queries to MySQL5
PHP renders full HTML string6
Complete HTML sent to browser7
Browser parses HTML, loads CSS/JS8
Full page reload for navigationEvery 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.js1
Browser Request2
Edge Middleware (auth, redirect)3
Server Component renders on server4
Prisma queries (type-safe)5
HTML streamed progressively6
Client Components hydrate7
SPA navigation (no full reload)8
Server Actions for mutationsNext.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.