We're planting a tree for every job application! Click here to learn more

Why Every Developer Should Learn Data Oriented Programming

Mihaela Popa

23 Feb 2021

•

3 min read

Why Every Developer Should Learn Data Oriented Programming
  • Clojure

Data Oriented Programming is an exciting new paradigm that eliminates the usual complexity caused by combining data and code into objects and classes. DOP cleanly separates code and data, which simplifies state management and eases concurrency.

We've asked Yehonathan Sharvit, the author of the book Data Oriented Programming to introduce us to the DOP principles and tell us why every developer should learn this programming paradigm.


I have been a software developer since 2001. After 10 years of suffering with C++, Java, JavaScript and Ruby, I discovered Clojure in 2012. Since then, I've been having a lot of fun in coding both for software companies and on open source projects of mine.

Over the last couple of years, I have asked myself: what makes it so fun and productive for me in Clojure? At first, I thought it was the power of expression that Functional programming provides and the short feedback loop of the Clojure REPL. But I was wrong. In fact, what makes Clojure stand out is the fact that it puts data at the centre. By embracing Data-Oriented programming, Clojure reduces the complexity of the system.

In the book, I illustrate the principles of DOP and how each of them reduces the complexity of a software system, whether in the front end or in the back end, no matter what language the system is written in.

Data Oriented Programming (DOP) is a programming paradigm that makes the systems we build less complex. The cool thing is that DOP is language-agnostic: it is applicable to any programming language.

One could adhere to DOP principles (or break them) in:

  • Object Oriented (OO) languages: Java, C#, C++…
  • Functional Programming (FP) languages: Clojure, Ocaml, Haskell…
  • Languages that support both OO and FP: JavaScript, Python, Ruby…

The idea behind Data Oriented programming is to simplify the design and implementation of software systems by putting data at the centre. Instead of designing information systems around entities that combine data and code (e.g. objects instantiated from classes), DOP encourages us to separate code from data. Moreover, DOP provides guidelines about how to represent and manipulate data.

The essence of DOP is that it treats data as a first-class citizen. As a consequence, in Data Oriented programs, we manipulate data with the same simplicity as we manipulate numbers or strings in any other programs.

Treating data as a first-class citizen is made possible by adhering to three core principles.

The principles of Data Oriented Programming are:

  1. Separate code from data
  2. Represent data entities with generic data structures
  3. Data is immutable

When these 3 principles are combined together, they form a cohesive whole that allows us to treat data as a first-class citizen. As a consequence, we improve our developing experience and make the systems we build easier to understand.

The principles of data oriented programming.png

In a Data-oriented system, code is separated from data and the data is represented with generic data structures that are immutable.

It should be noted that for OO developers, the transition to DOP might require more of a mind shift than for FP developers, as DOP guides us from the beginning to get rid of the habit of encapsulating data in stateful classes.

Throughout the book, we will explore in-depth how to apply DOP principles in the context of production information systems.


Written in a conversation style that hopefully makes it fun to read and easy to digest, the purpose of the book is to spread the word about DOP among the global community of developers so that they build systems that are less complex.

It is intended for developers who have experience in a high-level programming language. It could be a classic Object Oriented language like Java or C# or a dynamically-typed language like JavaScript, Ruby, or Python. We assume that you have already built (alone or in a team) a couple of web systems, either backend or frontend.

If you’re curious to learn more about Data Oriented Programming you can buy the book here. Use our promo code aff46421 for 30% off.

Did you like this article?

Mihaela Popa

Marketing Manager at WorksHub

See other articles by Mihaela

Related jobs

See all

Title

The company

  • Remote

Title

The company

  • Remote

Title

The company

  • Remote

Title

The company

  • Remote

Related articles

JavaScript Functional Style Made Simple

JavaScript Functional Style Made Simple

Daniel Boros

•

12 Sep 2021

JavaScript Functional Style Made Simple

JavaScript Functional Style Made Simple

Daniel Boros

•

12 Sep 2021

WorksHub

CareersCompaniesSitemapFunctional WorksBlockchain WorksJavaScript WorksAI WorksGolang WorksJava WorksPython WorksRemote Works
hello@works-hub.com

Ground Floor, Verse Building, 18 Brunswick Place, London, N1 6DZ

108 E 16th Street, New York, NY 10003

Subscribe to our newsletter

Join over 111,000 others and get access to exclusive content, job opportunities and more!

© 2024 WorksHub

Privacy PolicyDeveloped by WorksHub