# dop

Published articles for dop.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Separate data schema from data representation

DevFeed: [Separate data schema from data representation](<https://devfeed.tech/articles/separate-data-schema-from-data-representation-37566.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/databook/2022/06/22/data-validation.html>)

Author: Yehonathan Sharvit

Published: 2022-06-22T02:35:24Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [JSON Schema](<https://devfeed.tech/topics/json-schema.md>), [Data validation](<https://devfeed.tech/topics/data-validation.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [d](<https://devfeed.tech/tags/d.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [dop](<https://devfeed.tech/tags/dop.md>), [json-schema](<https://devfeed.tech/tags/json-schema.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

An exploration of the fourth principle of Data-Oriented Programming: keeping data schemas separate from data representations. The article explains how schemas describe expected data shapes and how validation libraries such as Ajv can check data against JSON Schema and report validation errors.

### Source excerpt

With data separated from code and represented with generic and immutable data structures, now comes the question of how do we express the shape of the data? In DOP, the expected shape is expressed as a data schema that is kept separated from the data itself. The main benefit of Principle #4 is that it allows developers to decide which pieces of data should have a schema and which pieces of data should not.

## Data is immutable

DevFeed: [Data is immutable](<https://devfeed.tech/articles/data-is-immutable-37568.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/databook/2022/06/22/immutable-data.html>)

Author: Yehonathan Sharvit

Published: 2022-06-22T02:34:24Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [data](<https://devfeed.tech/topics/data.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Clojure](<https://devfeed.tech/topics/clojure.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [d](<https://devfeed.tech/tags/d.md>), [data](<https://devfeed.tech/tags/data.md>), [dop](<https://devfeed.tech/tags/dop.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mutation](<https://devfeed.tech/tags/mutation.md>)

### AI overview

This article explains the third principle of Data-Oriented Programming: data is immutable. It describes replacing mutation with new data versions, contrasts this approach in Clojure and JavaScript, and discusses cloning and persistent data structures as implementation strategies.

### Source excerpt

With data separated from code and represented with generic data structures, how are changes to the data managed? DOP is very strict on this question. Mutation of data is not allowed! In DOP, changes to data are accomplished by creating new versions of the data. The reference to a variable may be changed so that it refers to a new version of the data, but the value of the data itself must never change.

## Represent data with generic data structures

DevFeed: [Represent data with generic data structures](<https://devfeed.tech/articles/represent-data-with-generic-data-structures-37567.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/databook/2022/06/22/generic-data-structures.html>)

Author: Yehonathan Sharvit

Published: 2022-06-22T02:33:24Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [Data structures](<https://devfeed.tech/topics/data-structures.md>), [Code](<https://devfeed.tech/topics/code.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [code](<https://devfeed.tech/tags/code.md>), [d](<https://devfeed.tech/tags/d.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [dop](<https://devfeed.tech/tags/dop.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [oop](<https://devfeed.tech/tags/oop.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This article explores the second principle of Data-Oriented Programming: representing application data with generic data structures such as maps and arrays instead of specific classes. It also discusses other structures, including sets, trees, and queues, and describes benefits such as reusable generic functions and a flexible data model.

### Source excerpt

When adhering to Principle #1 of DOP, code is separated from data. DOP is not opinionated about the programming constructs to use for organizing the code, but it has a lot to say about how the data should be represented. This is the theme of Principle #2.

## Separate code from data

DevFeed: [Separate code from data](<https://devfeed.tech/articles/separate-code-from-data-37569.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/databook/2022/06/22/separate-code-from-data.html>)

Author: Yehonathan Sharvit

Published: 2022-06-22T02:32:24Z

Content type: tutorial

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [classes](<https://devfeed.tech/topics/classes.md>)

Tags: [behavior](<https://devfeed.tech/tags/behavior.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [d](<https://devfeed.tech/tags/d.md>), [data](<https://devfeed.tech/tags/data.md>), [dop](<https://devfeed.tech/tags/dop.md>), [oop](<https://devfeed.tech/tags/oop.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This article explores the first principle of Data-Oriented Programming: separating code, or behavior, from data. It explains how the principle can be followed or violated in both object-oriented programming and functional programming, including examples involving classes, static methods, and lexical scope.

### Source excerpt

The first principle of Data-Oriented Programming (DOP) is a design principle that recommends a clear separation between code (behavior) and data. This may appear to be a FP principle, but in fact, one can adhere to it or break it either in FP or in OOP:

## Principles of Data-Oriented Programming

DevFeed: [Principles of Data-Oriented Programming](<https://devfeed.tech/articles/principles-of-data-oriented-programming-37570.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/dop/2022/06/22/principles-of-dop.html>)

Author: Yehonathan Sharvit

Published: 2022-06-22T02:31:24Z

Content type: article

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [data](<https://devfeed.tech/topics/data.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [d](<https://devfeed.tech/tags/d.md>), [data](<https://devfeed.tech/tags/data.md>), [developer-experience](<https://devfeed.tech/tags/developer-experience.md>), [dop](<https://devfeed.tech/tags/dop.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This article explains the four core principles of Data-Oriented Programming: separating code from data, representing data with generic data structures, treating data as immutable, and separating data schemas from representations. It presents DOP as a language-agnostic approach intended to simplify software systems and improve developer experience.

### Source excerpt

This article is an excerpt from my book about Data-Oriented Programming. More excerpts are available on my blog.

## An Experiment in Self-Referential Storytelling for Data-Oriented Programming

DevFeed: [An Experiment in Self-Referential Storytelling for Data-Oriented Programming](<https://devfeed.tech/articles/reading-the-present-moment-37565.md>)

Original publisher: [Read original article](<https://blog.klipse.tech/databook/2022/01/17/reading-the-present-moment.html>)

Author: Yehonathan Sharvit

Published: 2022-01-16T23:45:32Z

Content type: opinion

Language: en

Sources: [Klipse](<https://devfeed.tech/sources/klipse.md>)

Topics: [data](<https://devfeed.tech/topics/data.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [book](<https://devfeed.tech/tags/book.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [d](<https://devfeed.tech/tags/d.md>), [dop](<https://devfeed.tech/tags/dop.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

The article describes an experiment involving self-referential storytelling in Chapter 13 of Data-Oriented Programming. Its fictional characters discover apparent parallels between their story and the book, including shared topics and character names.

### Source excerpt

This is an experiment I am doing about introducing a bit of self-referential stuff in Chapter 13 of "Data-Oriented Programming.