Definition
A Dynamic Website generates its HTML files in real-time on the server per request, using server-side application programs (written in Node.js, Python, PHP, Ruby, etc.) that query databases and assemble custom, personalized code for each user.
Why It Matters
Dynamic websites are the foundation of interactive web platforms, e-commerce, social media, and user-profile driven systems. They allow for real-time content updates, user authentication, search functions, and personalized experiences. However, they require significantly more server power, carry higher hosting costs, are harder to cache, and introduce greater security vulnerabilities than static sites.
Core Concepts
- Server-Side Rendering (SSR): The process of executing code on a server to generate a complete HTML page in response to a user’s request.
- Database Integration: Querying relational (SQL) or non-relational (NoSQL) databases to pull, insert, or modify data in real-time.
- Dynamic Routing: Generating URLs and content dynamically based on parameters in the request path (e.g.,
/user/123). - Interactive Forms: Allowing users to submit data (e.g. comments, posts, purchases) that changes the state of the website.