Web Design/Dynamic websites
|
Web Design → Dynamic websites
|
A dynamic website is a website that generates page content programmatically for each request. Well-known dynamic websites include Wikipedia, which uses the MediaWiki application to serve millions of articles from a database, and platforms like Reddit, GitHub, and most e-commerce and blogging platforms, where content is assembled per-request from structured data.
This is in contrast to a traditional static website which can be represented by simple text files that don't change or require extra server-side processing per request (such as a website that could be written with just HTML and CSS). Static sites are faster to serve and simpler to host.
It is worth mentioning that in modern times, the classification of static vs. dynamic sites is usually more of a context-specific definition than a certain universal distinction. Modern development blends the two approaches, serving pre-rendered pages that have dynamic components that connect to APIs. Still, this differentiation is possible and useful from a certain architectural perspective in order to determine the configuration of networked resources that will be needed to develop, deploy, and maintain the website.
Content for dynamic websites is typically produced by a servier-side application that may query a database, apply business logic, or personalize output based on user input, session state, or other runtime conditions.
All websites require a server to respond to user requests. The server for a dynamic website has to do extra processing in order to respond with content that is customized for each request. When a client navigates to a URL or route in order to request a web page, the web server passes the request through an application layer (such as CGI, WSGI, or ASGI) which then processes the request and returns custom HTML and other content to the client's browser. The application layer typically relies on accessing data that is stored in a relational SQL database like MySQL or PostgreSQL, but of course a web app can retrieve and compose data from any online source.
This extra processing step performed by the app layer allows a single URL to serve different content depending on context, such as a logged-in user's profile page or the results of a search query.
The servers and applications and connected resources for dynamic websites are provisioned and programmed by "backend" engineers. These engineers are able to utilize a plethora of technologies to compose potentially sophisticated backend systems.
Server-side technologies
[edit | edit source]Many programming languages and frameworks can be used to build server-side web applications, including:
- Go
- Python
- JavaScript (Node.js)
- Ruby
- PHP -- Dynamic websites with PHP
- ASP Including the .NET Framework
- Perl
Note that Perl was the whole start of the server-side scripting for people who couldn't afford to buy or to learn the alternatives.
Powerful dynamic website applications can also be built using almost any bigger programming language (C, C++, Pascal for example) which speeds up overall execution time of the script. Using PHP or other applications is a bit of pain as the applications are quite slow because they need to interpretate the source code, compile and execute it. Whereas, compiled applications are only executed either using SAPI or CGI interface.
Web servers
[edit | edit source]Dynamic websites are typically served through a web server that supports one or more application interfaces. Common web servers include:
- Apache HTTP Server
- Nginx
- Microsoft IIS
Further reading
[edit | edit source]- A common dynamic web design pattern: ["Redirect After Post" by Michael Jouravlev 2004.
- "Yahoo! Design Pattern Library"
- "An Introduction to Using Patterns in Web Design by Ryan Singer 2004
- "Web Form Design Patterns: Sign-Up Forms" and "Web Form Design Patterns: Sign-Up Forms, Part 2" (who wrote this?)
- "Design Patterns for Web Programming" by Al Williams 2002

