Architecture — PageBuilder

A layered rendering foundation built around a shared page model.

1. Architectural Role

DMBPageBuilder is the foundation layer of the DMB web stack. Its architecture separates document orchestration, HTML generation and component composition so higher-level packages can register assets and render markup without owning the final page shell. PageBuilder provides the page lifecycle, builder base types and structured output model used by BootstrapBuilder, EffectBuilder, ComponentBuilder and DocumentationViewer.

…loading…

2. Main Layers

PageBuilder is organised into three layers. Each layer serves a distinct purpose in the document rendering lifecycle.

Page Layer

Owns PageInformation , document start/end rendering, page metadata, scripts, links and body orchestration.

PageRegistry.GetOrCreatePageInformation(...)
Builder Layer

Provides reusable base builders for tags, attributes, styles, classes and fluent rendering behavior.

HtmlBuilderBase
Composition Layer

Lets higher-level packages assemble reusable UI systems on top of the same rendering lifecycle.

BootstrapBuilder / EffectBuilder

3. Extension Points

Custom builders derived from the PageBuilder base types integrate directly into the rendering lifecycle. Asset registration through the shared page model ensures scripts, stylesheets and metadata are collected before the document head is emitted.

Asset registration pattern
// Register a stylesheet from inside a component
PageInformation page = PageRegistry.GetOrCreatePageInformation(httpContext);
page.SetStylesheet("/css/myComponent.css");
page.SetScriptFile("/js/myComponent.js");
Tech Stack
Backend: .NET 10 / ASP.NET Core
Rendering: Body-first pipeline
Architecture: Builder Pattern / Fluent API
Role: Foundation for the DMB stack

See it in action

Learn how the body-first pipeline captures components before the document head is emitted.

Rendering Pipeline