---
title: "REST-first design is Imperative, DDD is Declarative [Comparison] - DDD w/ TypeScript"
url: https://daily.dev/posts/rest-first-design-is-imperative-ddd-is-declarative-comparison---ddd-w-typescript-lddrqek1t
source_url: https://khalilstemmler.com/articles/typescript-domain-driven-design/ddd-vs-crud-design
type: article
source: "Khalil Stemmler"
published: 2026-06-17T11:26:07.908Z
updated: 2026-06-17T11:30:39.251Z
tags: ["architecture", "typescript", "rest-api", "domain-driven-design"]
reading_time: 11
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# REST-first design is Imperative, DDD is Declarative [Comparison] - DDD w/ TypeScript

**[Khalil Stemmler](https://daily.dev/sources/khalilstemmler)** · 11 min read · 0 upvotes · 0 comments

## Summary

A comparison between REST-first CRUD design and Domain-Driven Design (DDD) in Node.js/TypeScript applications. REST-first design tends to be imperative — business logic ends up scattered in controllers or services, leading to poor encapsulation, discoverability, and flexibility. DDD takes a declarative approach by encapsulating business rules inside domain entities, making the code more expressive and easier to extend. A movie rental example illustrates how a bloated controller with inline business rules can be refactored into a clean, declarative domain model where `customer.rentMovie(movie)` handles all constraints internally.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://khalilstemmler.com/articles/typescript-domain-driven-design/ddd-vs-crud-design>

## Similar posts on daily.dev

- [Front-End Architecture with Domain-Driven Design](https://daily.dev/posts/front-end-architecture-with-domain-driven-design-pzbik3lbx) · iO tech\_hub · 138 upvotes · 11 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#typescript](https://daily.dev/tags/typescript), [#rest-api](https://daily.dev/tags/rest-api), [#domain-driven-design](https://daily.dev/tags/domain-driven-design)

[View this post on daily.dev](https://daily.dev/posts/rest-first-design-is-imperative-ddd-is-declarative-comparison---ddd-w-typescript-lddrqek1t)
