Data-Oriented Programming: Reduce software complexity
Eliminate the unavoidable complexity of object-oriented designs. The innovative data-oriented programming paradigm makes your systems less complex by making it simpler to access and manipulate data.

In Data-Oriented Programming you will learn how to:

Separate code from data
Represent data with generic data structures
Manipulate data with general-purpose functions
Manage state without mutating data
Control concurrency in highly scalable systems
Write data-oriented unit tests
Specify the shape of your data
Benefit from polymorphism without objects
Debug programs without a debugger

Data-Oriented Programming is a one-of-a-kind guide that introduces the data-oriented paradigm. This groundbreaking approach represents data with generic immutable data structures. It simplifies state management, eases concurrency, and does away with the common problems you’ll find in object-oriented code. The book presents powerful new ideas through conversations, code snippets, and diagrams that help you quickly grok what’s great about DOP. Best of all, the paradigm is language-agnostic—you’ll learn to write DOP code that can be implemented in JavaScript, Ruby, Python, Clojure, and also in traditional OO languages like Java or C#.

Forewords by Michael T. Nygard and Ryan Singer.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Code that combines behavior and data, as is common in object-oriented designs, can introduce almost unmanageable complexity for state management. The Data-oriented programming (DOP) paradigm simplifies state management by holding application data in immutable generic data structures and then performing calculations using non-mutating general-purpose functions. Your applications are free of state-related bugs and your code is easier to understand and maintain.

About the book
Data-Oriented Programming teaches you to design software using the groundbreaking data-oriented paradigm. You’ll put DOP into action to design data models for business entities and implement a library management system that manages state without data mutation. The numerous diagrams, intuitive mind maps, and a unique conversational approach all help you get your head around these exciting new ideas. Every chapter has a lightbulb moment that will change the way you think about programming.

What's inside

Separate code from data
Represent data with generic data structures
Manage state without mutating data
Control concurrency in highly scalable systems
Write data-oriented unit tests
Specify the shape of your data

About the reader
For programmers who have experience with a high-level programming language like JavaScript, Java, Python, C#, Clojure, or Ruby.

About the author
Yehonathan Sharvit has over twenty years of experience as a software engineer. He blogs, speaks at conferences, and leads Data-Oriented Programming workshops around the world.

Table of Contents
PART 1 FLEXIBILITY
1 Complexity of object-oriented programming
2 Separation between code and data
3 Basic data manipulation
4 State management
5 Basic concurrency control
6 Unit tests
PART 2 SCALABILITY
7 Basic data validation
8 Advanced concurrency control
9 Persistent data structures
10 Database operations
11 Web services
PART 3 MAINTAINABILITY
12 Advanced data validation
13 Polymorphism
14 Advanced data manipulation
15 Debugging
"1141833453"
Data-Oriented Programming: Reduce software complexity
Eliminate the unavoidable complexity of object-oriented designs. The innovative data-oriented programming paradigm makes your systems less complex by making it simpler to access and manipulate data.

In Data-Oriented Programming you will learn how to:

Separate code from data
Represent data with generic data structures
Manipulate data with general-purpose functions
Manage state without mutating data
Control concurrency in highly scalable systems
Write data-oriented unit tests
Specify the shape of your data
Benefit from polymorphism without objects
Debug programs without a debugger

Data-Oriented Programming is a one-of-a-kind guide that introduces the data-oriented paradigm. This groundbreaking approach represents data with generic immutable data structures. It simplifies state management, eases concurrency, and does away with the common problems you’ll find in object-oriented code. The book presents powerful new ideas through conversations, code snippets, and diagrams that help you quickly grok what’s great about DOP. Best of all, the paradigm is language-agnostic—you’ll learn to write DOP code that can be implemented in JavaScript, Ruby, Python, Clojure, and also in traditional OO languages like Java or C#.

Forewords by Michael T. Nygard and Ryan Singer.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Code that combines behavior and data, as is common in object-oriented designs, can introduce almost unmanageable complexity for state management. The Data-oriented programming (DOP) paradigm simplifies state management by holding application data in immutable generic data structures and then performing calculations using non-mutating general-purpose functions. Your applications are free of state-related bugs and your code is easier to understand and maintain.

About the book
Data-Oriented Programming teaches you to design software using the groundbreaking data-oriented paradigm. You’ll put DOP into action to design data models for business entities and implement a library management system that manages state without data mutation. The numerous diagrams, intuitive mind maps, and a unique conversational approach all help you get your head around these exciting new ideas. Every chapter has a lightbulb moment that will change the way you think about programming.

What's inside

Separate code from data
Represent data with generic data structures
Manage state without mutating data
Control concurrency in highly scalable systems
Write data-oriented unit tests
Specify the shape of your data

About the reader
For programmers who have experience with a high-level programming language like JavaScript, Java, Python, C#, Clojure, or Ruby.

About the author
Yehonathan Sharvit has over twenty years of experience as a software engineer. He blogs, speaks at conferences, and leads Data-Oriented Programming workshops around the world.

Table of Contents
PART 1 FLEXIBILITY
1 Complexity of object-oriented programming
2 Separation between code and data
3 Basic data manipulation
4 State management
5 Basic concurrency control
6 Unit tests
PART 2 SCALABILITY
7 Basic data validation
8 Advanced concurrency control
9 Persistent data structures
10 Database operations
11 Web services
PART 3 MAINTAINABILITY
12 Advanced data validation
13 Polymorphism
14 Advanced data manipulation
15 Debugging
59.99 In Stock
Data-Oriented Programming: Reduce software complexity

Data-Oriented Programming: Reduce software complexity

by Yehonathan Sharvit
Data-Oriented Programming: Reduce software complexity

Data-Oriented Programming: Reduce software complexity

by Yehonathan Sharvit

Paperback

$59.99 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

Eliminate the unavoidable complexity of object-oriented designs. The innovative data-oriented programming paradigm makes your systems less complex by making it simpler to access and manipulate data.

In Data-Oriented Programming you will learn how to:

Separate code from data
Represent data with generic data structures
Manipulate data with general-purpose functions
Manage state without mutating data
Control concurrency in highly scalable systems
Write data-oriented unit tests
Specify the shape of your data
Benefit from polymorphism without objects
Debug programs without a debugger

Data-Oriented Programming is a one-of-a-kind guide that introduces the data-oriented paradigm. This groundbreaking approach represents data with generic immutable data structures. It simplifies state management, eases concurrency, and does away with the common problems you’ll find in object-oriented code. The book presents powerful new ideas through conversations, code snippets, and diagrams that help you quickly grok what’s great about DOP. Best of all, the paradigm is language-agnostic—you’ll learn to write DOP code that can be implemented in JavaScript, Ruby, Python, Clojure, and also in traditional OO languages like Java or C#.

Forewords by Michael T. Nygard and Ryan Singer.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the technology
Code that combines behavior and data, as is common in object-oriented designs, can introduce almost unmanageable complexity for state management. The Data-oriented programming (DOP) paradigm simplifies state management by holding application data in immutable generic data structures and then performing calculations using non-mutating general-purpose functions. Your applications are free of state-related bugs and your code is easier to understand and maintain.

About the book
Data-Oriented Programming teaches you to design software using the groundbreaking data-oriented paradigm. You’ll put DOP into action to design data models for business entities and implement a library management system that manages state without data mutation. The numerous diagrams, intuitive mind maps, and a unique conversational approach all help you get your head around these exciting new ideas. Every chapter has a lightbulb moment that will change the way you think about programming.

What's inside

Separate code from data
Represent data with generic data structures
Manage state without mutating data
Control concurrency in highly scalable systems
Write data-oriented unit tests
Specify the shape of your data

About the reader
For programmers who have experience with a high-level programming language like JavaScript, Java, Python, C#, Clojure, or Ruby.

About the author
Yehonathan Sharvit has over twenty years of experience as a software engineer. He blogs, speaks at conferences, and leads Data-Oriented Programming workshops around the world.

Table of Contents
PART 1 FLEXIBILITY
1 Complexity of object-oriented programming
2 Separation between code and data
3 Basic data manipulation
4 State management
5 Basic concurrency control
6 Unit tests
PART 2 SCALABILITY
7 Basic data validation
8 Advanced concurrency control
9 Persistent data structures
10 Database operations
11 Web services
PART 3 MAINTAINABILITY
12 Advanced data validation
13 Polymorphism
14 Advanced data manipulation
15 Debugging

Product Details

ISBN-13: 9781617298578
Publisher: Manning
Publication date: 08/16/2022
Pages: 424
Sales rank: 799,004
Product dimensions: 7.38(w) x 9.25(h) x 1.00(d)

About the Author

Yehonathan Sharvit has over twenty years experience as a software engineer, programming with C++, Java, Ruby, JavaScript, Clojure and ClojureScript. He currently works as a software architect at Cycognito building software infrastructures for high scale data pipelines. He writes about software engineering at his blog, speaks at conferences, and leads Clojure workshops around the world.

Table of Contents

Forewords xiii

Preface xvii

Acknowledgments xviii

About this book xx

About the author xxiv

About the cover illustration xxv

Dramatis personae xxvi

Part 1 Flexibility 1

1 Complexity of object-oriented programming 3

1.1 OOP design: Classic or classical? 4

The design phase 4

UML 101 6

Explaining each piece of the class diagram 9

The implementation phase 12

1.2 Sources of complexity 13

Many relations between classes 14

Unpredictable code behavior 16

Not trivial data serialization 18

Complex class hierarchies 20

2 Separation between code and data 26

2.1 The two parts of a DOP system 27

2.2 Data entities 29

2.3 Code modules 31

2.4 DOP systems are easy to understand 36

2.5 DOP systems are flexible 38

3 Basic data manipulation 43

3.1 Designing a data model 44

3.2 Representing records as maps 48

3.3 Manipulating data with generic functions 54

3.4 Calculating search results 58

3.5 Handling records of different types 65

4 State management 71

4.1 Multiple versions of the system data 72

4.2 Structural sharing 74

4.3 Implementing structural sharing 80

4.4 Data safety 82

4.5 The commit phase of a mutation 83

4.6 Ensuring system state integrity 85

4.7 Restoring previous states 86

5 Basic concurrency control 91

5.1 Optimistic concurrency control 92

5.2 Reconciliation between concurrent mutations 94

5.3 Reducing collections 97

5.4 Structural difference 99

5.5 Implementing the reconciliation algorithm 106

6 Unit tests 110

6.1 The simplicity of data-oriented test cases 110

6.2 Unit tests for data manipulation code 112

The tree of function calls 113

Unit tests for functions down the tree 115

Unit tests for nodes in the tree 119

6.3 Unit tests for queries 121

6.4 Unit tests for mutations 126

Part 2 Scalability 137

7 Basic data validation 141

7.1 Data validation in DOP 142

7.2 JSON Schema in a nutshell 143

7.3 Schema flexibility and strictness 149

7.4 Schema composition 154

7.5 Details about data validation failures 158

8 Advanced concurrency control 163

8.1 The complexity of locks 164

8.2 Thread-safe counter with atoms 165

8.3 Thread-safe cache with atoms 170

8.4 State management with atoms 172

9 Persistent data structures 175

9.1 The need for persistent data structures 175

9.2 The efficiency of persistent data structures 178

9.3 Persistent data structures libraries 184

Persistent data structures in Java 184

Persistent data structures in JavaScript 186

9.4 Persistent data structures in action 188

Writing queries with persistent data structures 188

Writing mutations with persistent data structures 191

Serialization and deserialization 192

Structural diff 193

10 Database operations 197

10.1 Fetching data from the database 198

10.2 Storing data in the database 204

10.3 Simple data manipulation 207

10.4 Advanced data manipulation 211

11 Web services 220

11.1 Another feature request 221

11.2 Building the insides like the outsides 222

11.3 Representing a client request as a map 225

11.4 Representing a server response as a map 227

11.5 Passing information forward 231

11.6 Search result enrichment in action 234

Part 3 Maintainability 245

12 Advanced data validation 247

12.1 Function arguments validation 248

12.2 Return value validation 255

12.3 Advanced data validation 257

12.4 Automatic generation of data model diagrams 260

12.5 Automatic generation of schema-based unit tests 262

12.6 A new gift 269

13 Polymorphism 272

13.1 The essence of polymorphism 273

13.2 Multimethods with single dispatch 277

13.3 Multimethods with multiple dispatch 281

13.4 Multimethods with dynamic dispatch 286

13.5 Integrating multimethods in a production system 289

14 Advanced data manipulation 295

14.1 Updating a value in a map with eloquence 296

14.2 Manipulating nested data 299

14.3 Using the best tool for the job 301

14.4 Unwinding at ease 305

15 Debugging 311

15.1 Determinism in programming 312

15.2 Reproducibility with numbers and strings 314

15.3 Reproducibility with any data 318

15.4 Unit tests 321

15.5 Dealing with external data sources 329

Appendix A Principles of data-oriented programming 333

Appendix B Generic data access in statically-typed languages 364

Appendix C Data-oriented programming: A link in the chain of programming paradigms 381

Appendix D Lodash reference 387

Index 391

From the B&N Reads Blog

Customer Reviews