- Home
- /
- Foundation
- /
- DMBPageBuilder
- /
- Extensibility
Extensibility
Use PageBuilder as a foundation, not just as a library.
Overview
PageBuilder is designed to be extended. It is not only a set of ready-to-use helpers. It is a rendering foundation intended to support custom builders, custom rendering systems, custom body layouts, and higher-level component libraries.
This extensibility is one of the main reasons the framework separates page orchestration, builder infrastructure, and composition logic so carefully.
Why extensibility matters
A rendering framework becomes far more valuable when it can grow with the application instead of forcing the application into rigid predefined patterns. PageBuilder was built to support that kind of growth. In practice, this means you should be able to:
BootstrapBuilder is one example of this philosophy in action.
Main extension points
Custom builders
The most direct extension point is the creation of custom builders. A custom builder can derive from HtmlBuilderBase<TBuilder> or from one of the more specialized builder base classes in your framework. This allows you to create reusable rendering primitives while still inheriting the core systems for attributes, styles, classes, internal state, cloning, and rendering.
Custom CSS composers
If a styling rule is reusable across builders or across a family of components, it can be extracted into a custom CSS composer. This allows styling logic to evolve independently from the structural rendering logic of a builder.
Custom body builders
At the page-structure level, you can extend the framework by creating your own IBodyBuilder implementation. This allows you to define an application-level body shell while still participating in the same document pipeline.
Higher-level modules
PageBuilder is specifically designed to support higher-level rendering modules. A module built on top of PageBuilder can introduce its own components, conventions, action systems, styling vocabulary, and rendering patterns while still relying on the same base pipeline. This is what turns PageBuilder into a platform rather than a simple rendering helper library.
Extensibility and the shared page model
Extensions do not exist outside the page pipeline. A custom builder or a higher-level module can still contribute to the shared PageInformation while rendering. This is important because extensibility in PageBuilder is not only about generating HTML — it is also about participating correctly in the document model used by the rendering pipeline.
An extension should be able to generate its output and declare its page-level dependencies in a way that remains consistent with the rest of the framework.
Design principle: extend through the model, not around it
The safest way to extend
Build on top of the architecture rather than bypassing it. Respect the rendering contract, use the existing attribute and style systems, participate in the shared page model, and preserve builder lifecycle consistency. Extensions built this way remain coherent with the framework and with each other.
Shortcuts often seem convenient when creating new components or rendering features. Over time, however, they usually create inconsistency. Some components follow the framework model, others bypass it, and the overall rendering system becomes harder to understand.
PageBuilder extensibility works best when custom code follows the same architectural discipline as the core framework. This is what allows an ecosystem to remain understandable as it grows.
Recommended usage
Continue with Diagnostics
Learn how to inspect, debug, and validate rendering behavior in PageBuilder.
Diagnostics →