RAD Studio 13.2 · WebStencils

WebStencils: the perfect choice for web development with Delphi or C++

Build web UIs from standard HTML files and merge them with server-side business logic, without locking yourself into a framework.

  • Templates are plain HTML: a web developer can create and edit them directly.
  • Bring your own stack: Bootstrap, jQuery, HTMX, Tailwind, or custom CSS/JS.
  • Minimal learning curve: templates read like HTML with a few @ keywords.
Available in: RAD Studio Delphi C++Builder
Why WebStencils

Plain HTML templates. Any web technology. Your choice.

Templates are simple HTML files that any developer or designer can edit. Plain HTML pages and template pages can live side by side, and both can use the libraries your team already uses.

Key point

Delphi and C++ developers don’t have to own the frontend. Hand UI work to web specialists when it makes sense.

  • Works with Bootstrap, jQuery, HTMX, Tailwind, or vanilla JavaScript
  • Full pages or partial building blocks
  • Web developers own the UI and styling
  • Delphi/C++ developers own the business logic and security

Tip: style your pages with your favourite CSS framework and add HTMX attributes for partial updates.

Web team

UI and styling

HTMLCSSTailwindBootstrapHTMX
@ WebStencils
Delphi / C++ team

Business logic and security

WebBrokerRAD ServerFireDACRESTSessions
Capabilities

What you can do with WebStencils

Server-side scripting for WebBroker and RAD Server, from simple sites to business web applications.

Develop modern websites

Blogs, online catalogs and wikis. WebStencils adds server-side scripting to WebBroker and RAD Server.

Simplified syntax

The @ symbol, curly braces and dot notation for object values. Easier to maintain than older tag-based notations.

Perfect for HTMX

Server-side generation suits HTMX pages, which can also call REST servers to update content, with less complex JavaScript.

Reusable templates & layouts

Shared layouts with @LayoutPage and @RenderBody, reusable components with @Import.

How it works

From business logic to web page in three steps

The backend stays in Delphi or C++, the UI stays in HTML.

  1. 01

    Build your backend

    Expose data and actions from your Delphi or C++ application.

  2. 02

    Create HTML templates

    Use @ keywords for values, loops and conditions inside standard HTML.

  3. 03

    Add modern UX (optional)

    HTMX attributes for partial updates, without a heavy JavaScript framework.

Syntax

Learn the syntax in minutes

Templates stay HTML: add @ loops and conditions only where content is dynamic.

01 Layout, loop and import

tasks.html
1@LayoutPage BaseTemplate
2<h2>@page.Title</h2>
3<ul>
4@ForEach (var task in Tasks.AllTasks) {
5  @Import partials/taskItem
6}
7</ul>

02 Security hooks (session-based)

nav.html
1@if session.Authenticated {
2  <a href=“/profile”>My profile</a>
3}
4@if session.UserHasRole(‘admin’) {
5  <a href=“/admin”>Administration</a>
6}

Get your free guide to fast web development

A white paper on WebStencils and HTMX written by Antonio Zapater.

Download your free guide
01A deep dive into WebStencils
02An introduction to HTMX and its core concepts
03Practical, step-by-step tutorials and examples
04Advanced techniques for scalable web applications
05Integration with RAD Server for enterprise solutions
AZ
Antonio ZapaterAuthor · RAD Studio expert with years of experience in web development and server-side technologies
FAQ

Frequently asked questions

Q.Are templates just HTML?

Yes. Templates are plain HTML files, full pages or partials, that can include your existing CSS and JavaScript. Web developers can ship UI changes without touching backend code.

Q.Must I use a specific front-end framework?

No. Any CSS or JS library works (Bootstrap, Tailwind, jQuery, HTMX), so there is no lock-in.

Q.How do I deploy?

Host with WebBroker or RAD Server, standalone or behind Apache, NGINX, IIS, or via FastCGI.

Q.Where does my code run?

Business logic runs server-side in Delphi or C++. Only minimal JavaScript is needed when you use HTMX.

Docwiki

Documentation

Complete WebStencils documentation with examples and best practices.

View docs
GitHub

Sample projects

Real-world examples and demo applications in Embarcadero’s GitHub repository.

Browse repository
Product

RAD Studio

WebStencils is part of RAD Studio, Delphi and C++Builder. Learn more about RAD Studio.

Learn more
3M+developers worldwide
@one marker for dynamic content
0front-end framework lock-in
2hosting options: WebBroker and RAD Server

Try WebStencils today

Start a free RAD Studio trial and build your first web application in Delphi or C++, or request a demo.