DARRT Project: Representation

Learn about the role of representation in the DARRT framework.

We'll cover the following

Representation in DARRT framework

The second R in DARRT stands for representation. This refers to the format of the HTTP API responses. HTTP APIs can use a wide variety of formats to represent HTTP responses. The most common response for APIs today is plain JSON (application/json), but a number of other formats also exist.

In the DARRT framework, we can vary the response representations by simply loading one of the preset formats and referencing them when implementing the API. For this course, we’ve collected a small set of formats. Each of them was implemented using the EJS (Embedded JavaScript templating) templating engine for Node.js. These templates are provided in the darrt/representors/ folder. You check these templates by executing the cd representors and ls commands in the terminal below.

Get hands-on with 1200+ tech skills courses.