
Welcome
Thank you for purchasing the MEAP for Data Oriented Programming.
The book is written for developers having 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 of frontend.
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.
I discovered Data Oriented programming 10 years ago when I started to code in Clojure. Since then, the quality of my design and my code has increased significantly and the systems I build in Clojure and in other programming languages are much simpler and much more flexible.
DOP is based on 4 fundamental principles that we expose briefly in Chapter 0. The principles might seem basic at first sight, but when you apply them in the context of a production ready information system, they become very powerful.
Chapter 1 exposes some common pains that Object Oriented developers experience when they develop a system. Please don’t read it as a critics of Object Oriented Programming. The main purpose of Chapter 1 is to motivate you to learn a different programming paradigm.
Starting from Chapter 2, we expose — one by one — the four principles of DOP and their benefits in the context of a production ready information system.
In order to make the teachings very concrete, we demonstrate how the principles of DOP are translated in code. We have chosen JavaScript as the main language for the code snippets of the book, but the ideas are applicable to any programming language. We have chosen JavaScript because it supports both Object Oriented and Functional programming style and its syntax is easy to read even for folks not familiar with JavaScript.
The book is full of diagrams and mind maps that illustrate the ideas.
The teachings of the book are conveyed through a story of an Object-Oriented programmer that meets a Data- Oriented Programming expert and learn from them how DOP makes a system less complex and more flexible. I hope that you find the conversation between the developer and the expert fun to read and that it clarifies the teaching in the sense that the questions the developers ask the expert resonate well with the questions you ask yourself during reading.
I truly believe that Data-Oriented Programming will make you a better developer, as it has been the case for me since I discovered it 10 years ago.
I look forward to reading any questions or comments you may have along the way on Manning’s liveBook Discussion Forum. Your feedback is an invaluable part of making this book the best that it can be.
One last thing, the name of the main character of the book is: You!
-- Yehonathan Sharvit
In this book
Appendix A. Principles of Data-Oriented Programming Appendix B. Generic data access in statically-typed languages Appendix C. Data-Oriented Programming: A link in the chain of programming paradigms Appendix D. Lodash reference