Content, State, Communication
Overview
In the last part, we started to look into client-side scalability. In this part, we continue with the topic, focusing on both separating content from presentation and client-server communication. This part is organized as follows:
- Content Collections discusses the possibilities of separating the presentation layer from structured content, and showcases how to create pages where the content is created with eXtended MarkDown (MDX).
- Island Architecture discusses the idea of islands — regions with dynamic content with initial static content rendered on the server — in more detail, including their relation with the broader web development landscape, and shows how dynamic components are added to MDX files.
- State Management outlines potential challenges related to client-side state from the use of islands, and visits how to share state between components.
- Client-Server Communication introduces basic polling techniques for checking for updates from the server.
- Server-Sent Events shows how create a persistent HTTP connection for one-way communication, allowing sending events from the server to the client.
- WebSockets shows how to upgrade a HTTP connection to a WebSocket connection, and how to use a WebSocket connection for bi-directional communication between the client and the server.
- Communication and Scaling discusses scalability issues with communication approaches that maintain a connection between the client and the server, presenting a way to scale client-server communication over multiple servers.
- Overarching Project continues with the overarching project, adding functionality for sending updates about grading from the server to the client.
Finally, at the end of the part, there is a recap and feedback chapter that briefly summarizes the part and asks for feedback on the part.