SimplyPages Mental Model
SimplyPages is a Java-first SSR framework.
The model is straightforward:
- Use components for primitives.
- Use modules for reusable composed sections.
- Use pages and layout containers for structure.
- Use templates + slots for request-time dynamic content.
Core Types
Component: renderable contract.HtmlTag: base tag implementation for most components.Module: build-once composed unit (buildContent()lifecycle).RenderContext: per-request slot data container.SlotKey<T>: typed dynamic value key.Slot<T>: dynamic placeholder bound to aSlotKey.Template: compiled render structure.
Two Rendering Modes
- Static composition:
- Build component tree once.
- Render once or on demand without slot data.
- Dynamic slot-driven rendering:
- Define static
TemplateandSlotKeys. - Inject request-time data through
RenderContext.
Non-Negotiable Lifecycle Rule
Module.build() is idempotent and build-once.
Do not treat buildContent() as per-request mutation logic.
If data changes per request, put that data behind SlotKey and render through Template.
Suggested Team Conventions
- Keep
SlotKeydeclarations aspublic static finalconstants. - Keep
Templateinstances aspublic static finalwhere possible. - Keep controllers thin: fetch domain data, map to context, render template.
- Keep business logic out of component classes.