- Home
- /
- Design
- /
- DMBComponentBuilder
- /
- Rendering Pipeline
Rendering Pipeline — ComponentBuilder
From product data definitions to composed BootstrapBuilder experiences.
Prepare Data
The page or controller prepares component definitions from realistic application data. Component definitions carry business-facing state such as title, status, date, rating or media source.
var items = new List<TimelineItem>
{
new() { Title = "Design", Status = TimelineStatus.Done, Date = "Jan 2025" },
new() { Title = "Build", Status = TimelineStatus.Active, Date = "Mar 2025" },
new() { Title = "Launch", Status = TimelineStatus.Pending, Date = "Jun 2025" },
};Create Component Builder
The view passes definitions to a ComponentBuilder builder. The builder receives domain-shaped data and selects the appropriate rendering structure and BootstrapBuilder primitives.
@Html.TimelineBuilder()
.AddItems(items)
.Render()Compose UI
The component maps data to BootstrapBuilder rows, cards, badges, lists, sections or actions. Builders translate status into visual structure and Bootstrap options. Rendering remains deterministic.
// Inside the component builder — translates state to markup
foreach (var item in items)
{
var badge = item.Status switch
{
TimelineStatus.Done => VariantStyle.Success,
TimelineStatus.Active => VariantStyle.Primary,
_ => VariantStyle.Secondary
};
// ... render with BootstrapBuilder
}PageBuilder Completes the Document
BootstrapBuilder primitives emit final HTML into the PageBuilder body capture. PageBuilder renders the final document with any registered resources after body capture completes.
// Component rendering feeds into the PageBuilder body-first pipeline
// Assets registered during component render appear in the final <head>
page.SetStylesheet("/css/timeline.css");Data-Driven Components
Component definitions keep business state separate from Bootstrap markup — swap the builder without touching the domain model.