Data-Oriented Programming

by Yehonathan Sharvit

Software Development

Book Details

Book Title

Data-Oriented Programming

Author

Yehonathan Sharvit

Publisher

Manning Publications

Publication Date

2022

ISBN

9781617298578

Number of Pages

426

Language

English

Format

PDF

File Size

7.1MB

Subject

Software Engineering; Databases; Debugging; Data Structures; Concurrency; Object-Oriented Programming

Table of Contents

  • Data-Oriented Programming
  • brief contents
  • contents
  • forewords
  • preface
  • acknowledgments
  • about this book
  • about the author
  • about the cover illustration
  • dramatis personae
  • Part 1—Flexibility
  • Chapter 1: Complexity of object- oriented programming
  • 1.1 OOP design: Classic or classical?
  • 1.2 Sources of complexity
  • Summary
  • Chapter 2: Separation between code and data
  • 2.1 The two parts of a DOP system
  • 2.2 Data entities
  • 2.3 Code modules
  • 2.4 DOP systems are easy to understand
  • 2.5 DOP systems are flexible
  • Summary
  • Chapter 3: Basic data manipulation
  • 3.1 Designing a data model
  • 3.2 Representing records as maps
  • 3.3 Manipulating data with generic functions
  • 3.4 Calculating search results
  • 3.5 Handling records of different types
  • Summary
  • Chapter 4: State management
  • 4.1 Multiple versions of the system data
  • 4.2 Structural sharing
  • 4.3 Implementing structural sharing
  • 4.4 Data safety
  • 4.5 The commit phase of a mutation
  • 4.6 Ensuring system state integrity
  • 4.7 Restoring previous states
  • Summary
  • Chapter 5: Basic concurrency control
  • 5.1 Optimistic concurrency control
  • 5.2 Reconciliation between concurrent mutations
  • 5.3 Reducing collections
  • 5.4 Structural difference
  • 5.5 Implementing the reconciliation algorithm
  • Summary
  • Chapter 6: Unit tests
  • Part 2—Scalability
  • Chapter 7: Basic data validation
  • 7.1 Data validation in DOP
  • 7.2 JSON Schema in a nutshell
  • 7.3 Schema flexibility and strictness
  • 7.4 Schema composition
  • 7.5 Details about data validation failures
  • Summary
  • Chapter 8: Advanced concurrency control
  • 8.1 The complexity of locks
  • 8.2 Thread-safe counter with atoms
  • 8.3 Thread-safe cache with atoms
  • 8.4 State management with atoms
  • Summary
  • Chapter 9: Persistent data structures
  • 9.1 The need for persistent data structures
  • 9.2 The efficiency of persistent data structures
  • 9.3 Persistent data structures libraries
  • 9.4 Persistent data structures in action
  • Summary
  • Chapter 10: Database operations
  • 10.1 Fetching data from the database
  • 10.2 Storing data in the database
  • 10.3 Simple data manipulation
  • 10.4 Advanced data manipulation
  • Summary
  • Chapter 11: Web services
  • 11.1 Another feature request
  • 11.2 Building the insides like the outsides
  • 11.3 Representing a client request as a map
  • 11.4 Representing a server response as a map
  • 11.5 Passing information forward
  • 11.6 Search result enrichment in action
  • Delivering on time
  • Summary
  • Part 3—Maintainability
  • Chapter 12: Advanced data validation
  • 12.1 Function arguments validation
  • 12.2 Return value validation
  • 12.3 Advanced data validation
  • 12.4 Automatic generation of data model diagrams
  • 12.5 Automatic generation of schema-based unit tests
  • 12.6 A new gift
  • Summary
  • Chapter 13: Polymorphism
  • 13.1 The essence of polymorphism
  • 13.2 Multimethods with single dispatch
  • 13.3 Multimethods with multiple dispatch
  • 13.4 Multimethods with dynamic dispatch
  • 13.5 Integrating multimethods in a production system
  • Summary
  • Chapter 14: Advanced data manipulation
  • 14.1 Updating a value in a map with eloquence
  • 14.2 Manipulating nested data
  • 14.3 Using the best tool for the job
  • 14.4 Unwinding at ease
  • Summary
  • Chapter 15: Debugging
  • 15.1 Determinism in programming
  • 15.2 Reproducibility with numbers and strings
  • 15.3 Reproducibility with any data
  • 15.4 Unit tests
  • 15.5 Dealing with external data sources
  • Farewell
  • Summary
  • 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
  • index