Skip to Content
Drash v3 is in beta. APIs may change.
DocsMiscGlossary

Glossary

This page (inspired by MDN Web Docs Glossary ) contains the definitions of the terms and acronyms we use.

All of the terms and acronyms we use are used in the context of Drash unless otherwise stated.

Terms

We know some of the words/phrases (aka terms) we use may be used widely outside of Drash, so we have provided the terms and definitions below to prevent ambiguity and confusion. For example, “runtime” is used in Java Runtime Environment, Red Hat Runtimes, and Node (a JavaScript runtime). However, in the context of Drash, the word “runtime” refers to JavaScript runtime environments like Deno, Node, Cloudflare Workers, Bun, the browser, etc.

Application

The object you build with Application.builder(). It receives requests, routes them to your resources, and returns what they produce.

Under the hood it is an HTTP request chain — see Chain — but “application” is what you are building, so that is the name the HTTP module exposes.

See also Chain, Resource

Builder

A builder is explained on the Builders page.

See also Chain, Resource

Client

Any “thing” that makes a request to your resources.

See also Chain, Request, Resource

Chain

A chain is explained on the Chains page.

See also Handler

Directory

This is an alias for “folder,” but we like to use “directory” instead of “folder” across the Drash v3.x documentation pages.

Environment

This is a broad term that can mean many things depending on the context. This includes, but is not limited to:

  • The computer you are using to write your code (aka your machine)
  • The runtime you are using to run your code
  • Your IDE 
  • The machine that is running your code in Azure, AWS, etc.
  • The machine running your CI/CD workflows (e.g, GitHub Actions, Azure Pipelines, etc.)
  • A Docker container

It can also mean a combination of the above. The below diagram shows how an environment can be a single thing or a combination of environments.

Your laptop -> Environment for: Your IDE + Your terminal | |-- Your IDE -> Environment for: Your code + Some IDE plugin | |-- Some IDE plugin | |-- Your code | |-- Your terminal -> Environment for: Deno |-- Deno -> Environment for: Your app |-- Your app

See also Local Environment, Machine, Runtime

Handler

A class with a handle(input: Input): Output method. Handlers are part of a chain. Their job is to process HTTP requests.

They look like the following:

// Typically, concrete handler classes extend an abstract handler class. It // looks like this: abstract class AbstractHandler<Input, Output> implements IHandler<Input, Output> { next_handler: IHandler<Input, Output> | null = null; abstract handle(input: Input): Output; } // When a concrete handler class is defined, it implements the `handle` method // like this: class BeItKnownThisIsMyHandler extends AbstractHandler<Request, Response> { handle(request: Request): Response { if (request.method === "GET") { return new Response("Got."); } return new Response("Not got."); } }

See also Chain

Inputs

The data passed to each handler in a chain to help it produce an output.

See also Handler, Chain, Outputs

Local Environment

The computer you are using to write and run your code (e.g., your laptop or desktop computer). This is a more specific form of an Environment explained above. An environment is a broad term and can mean remote computers (e.g., machines in Azure running your code), your IDE, or even a Docker container. When we use the term “local environment,” we always mean the computer you are using to write and run your code.

See also Environment

Machine

This is an alias for “computer” and we use these two terms synonymously.

Node

This is an alias for the Node.js runtime.

Outputs

The data returned from each handler in a chain in response to an input.

See also Chain, Handler, Inputs

Paths

The paths defined in a resource class’ paths property. These paths have the same definition as the URL.pathname property.

Below is what the paths property looks like in a resource class:

class MyResource { public paths = [ "/teas", ]; // ... // ... rest of the resource class implementation (code is shortened for brevity) // ... }

Protocol

We define this the same as MDN > Protocol .

A protocol is a system of rules that define how data is exchanged within or between computers. Communications between devices require that the devices agree on the format of the data that is being exchanged. The set of rules that defines a format is called a protocol.

Request

This is an alias for HTTP Request .

Resource

Resources are explained on the Resources page.

Runtime

Runtime refers to a JavaScript runtime like Deno, Node, Bun, Cloudflare Workers, and the browser.

Acronyms

We try to write these documentation pages briefly and clearly. However, it can get repetitive to write the same words over and over when a well-known acronym exists for them. If you see acronyms, you can find their definitions here.

CJS

Definition: CommonJS Module

ESM

ECMAScript Module

JS

JavaScript

JS ESM

These two acronyms are usually applied to example code block tabs. It means, “The example code for this tab is written in JavaScript using Drash as an ECMAScript Module.”

TLDR

This is an alias for TL;DR , but without the semicolon.

TS

TypeScript

Last updated on