Dynamic Markdown
Use a Script block or the page’s supported inline-expression syntax to calculate values during rendering. Keep queries above the presentation and return a small view model to the Markdown layer. Conceptually:Generate XML
Script has a native XML syntax with embedded expressions and XML pattern matching. Prefer it over string concatenation because names, attributes, and values are encoded structurally. Use XML for:- contract machine-readable sections;
- XMPP information queries;
- gateway/module configuration;
- interoperable IoT payloads and schemas;
- transformations through XSL.
Content negotiation
The runtime’sInternetContent system selects encoders and decoders by media type. A dynamic resource should:
- inspect the request
Acceptheader; - produce a typed result;
- let the content system choose an encoder;
- set explicit cache and privacy headers;
- return
406 Not Acceptablewhen no safe representation exists.
Web control flow
Web extensions can issue redirects and client/server HTTP errors from Script. Use explicit status codes, avoid reflecting raw exception text, and return machine-readable errors for APIs.Graphs and documents
Installed modules provide:- 2D and 3D graphs;
- palettes and fractals;
- Layout2D documents;
- Markdown-to-HTML and Markdown-to-PDF;
- XML and XSL transforms;
- QR codes and image processing;
- semantic formats.
Security
- Treat request variables and uploaded content as untrusted.
- Do not evaluate user-provided Script.
- Encode values through typed renderers.
- Restrict file and network access from public pages.
- Avoid returning .NET objects that expose unintended public properties.
- Set CSP/CORS per resource, not globally for convenience.