Skip to content

VDP Logo

View Descriptor Protocol

Server-driven template binding for any client


What is VDP?

The View Descriptor Protocol defines a standard way for APIs to tell clients which templates to use for rendering data. A view descriptor is a JSON structure that identifies a root template by URL and declares how sub-templates compose into named slots, forming a recursive template tree.

VDP works with any rendering framework — HTML/Qute, SwiftUI, Jetpack Compose, React, or anything else that supports named insertion points.

Template Binding

The server declares which templates render which data. Templates handle data binding using their own mechanisms (Qute expressions, mustache, Apache FreeMarker, JSONPath, etc.).

Recursive Slots

Templates compose via named slots. Each slot value is itself a view descriptor, enabling arbitrarily deep template trees — in other words, templates within templates.

Dual Transport

Embed view descriptors inline (_view / _views in HAL+JSON) or reference them via HTTP Link headers (RFC 8288) for constrained formats like OData4.

Cacheable Descriptors

View descriptors are standalone resources with their own URLs, independently cacheable from the data they describe.

Cross-Platform

One API response, multiple views. Serve different template trees for desktop, mobile, compact, and full layouts from the same data endpoint.

Standards-Compatible

Built on REST, HAL, RFC 8288, and OData4. VDP extends existing standards without breaking them.

Quick Example

A VDP view descriptor tells the client to render a sidebar layout, filling its slots with a dashboard, navigation, and data components:

{
  "template": "https://example.com/templates/layouts/sidebar",
  "slots": {
    "mainContent": {
      "template": "https://example.com/templates/dashboard",
      "slots": {
        "statsCards": {
          "template": "https://example.com/templates/components/card"
        },
        "activityTable": {
          "template": "https://example.com/templates/components/table"
        }
      }
    },
    "sidebarNav": {
      "template": "https://example.com/templates/components/nav"
    }
  }
}

Status

VDP is in early working draft stage (v0.1, alpha). The specification is being actively developed.