وبلاگ بلیان

Data-Oriented Programming: Unlearning Objects, MEAP Version 2

معرفی کتاب «Data-Oriented Programming: Unlearning Objects, MEAP Version 2» نوشتهٔ Yehonathan Sharvit، منتشرشده توسط نشر Manning Publications Co. LLC; Manning در سال 2021. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Data-Oriented Programming: Unlearning Objects, MEAP Version 2» در دستهٔ بدون دسته‌بندی قرار دارد.

Data-Oriented Programming teaches you to design and implement software using the data-oriented programming paradigm. In it, you’ll learn author Yehonathan Sharvit’s unique approach to DOP that he has developed over a decade of experience.Every chapter contains a new light bulb moment that will change the way you think about programming. As you read, you’ll build a library management system using the DOP paradigm. You’ll design data models for business entities, manipulate immutable data collections, and write unit tests for data-oriented systems.Chapters 1 - 4 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. 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 MEAP V2 Data-Oriented Programming MEAP V02 1 Copyright 2 Welcome 3 Brief contents 4 Chapter 0: Principles of Data-Oriented Programming 5 0.1 Introduction 5 0.2 DO Principle #1: Separate code from data 7 0.2.1 The principle in a nutshell 7 0.2.2 Illustration of Principle #1 7 0.2.3 Benefits of Principle #1 9 0.2.4 Price for Principle #1 16 0.2.5 Wrapping up 17 0.3 DO Principle #2: Represent data entities with generic data structures 18 0.3.1 The principle in a nutshell 18 0.3.2 Illustration of Principle #2 19 0.3.3 Benefits of Principle #2 20 0.3.4 Price for Principle #2 21 0.3.5 Wrapping up 23 0.4 DO Principle #3: Data is immutable 24 0.4.1 The principle in a nutshell 24 0.4.2 Illustration of Principle #3 25 0.4.3 Benefits of Principle #3 26 0.4.4 Price for Principle #3 28 0.4.5 Wrapping up 28 0.5 Conclusion 29 Chapter 1: The tendency of Object Oriented Programming towards increased system complexity 31 1.1 Introduction 31 1.2 OO design: classic or classical? 32 1.2.1 Meeting with a customer 32 1.2.2 The design phase 32 1.2.3 UML 101 35 1.2.4 Explaining each piece of the class diagram 38 1.2.5 The implementation phase 42 1.3 Sources of complexity 42 1.4 When code and data are mixed, classes tend to be involved in many relations 43 1.5 When objects are mutable, understanding code requires extra thinking 47 1.6 When data is locked in objects as members, data serialization is not trivial 49 1.7 When code is locked into classes, class hierarchies are complex 51 1.8 Wrapping up 56 Chapter 2: Reduce system complexity by separating Code from Data 58 2.1 Introduction 58 2.2 The two parts of a DO system 59 2.3 Data entities 60 2.4 Code modules 62 2.5 DO systems are easy to understand 68 2.6 DO systems are flexible 71 2.7 Wrapping up 75 Chapter 3: Manipulate the whole system data with generic functions 77 3.1 Introduction 77 3.2 Design a data model 77 3.3 Represent records as maps 83 3.4 Manipulate data with generic functions 90 3.5 Calculate search results 94 3.6 Handle records of different types 100 3.7 Wrapping up 105 Chapter 4: State management with immutable data 106 4.1 Introduction 106 4.2 Multiple versions of the system data 107 4.3 Structural sharing 109 4.4 Data safety 115 4.5 The Commit phase of a mutation 116 4.6 Ensure system state integrity 118 4.7 Time travel 120 4.8 Wrapping up 122 Notes 123 Code that combines behavior and data, as is common in object-oriented designs, can introduce almost unmanageable complexity for state management. The data-orineted 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. 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
دانلود کتاب Data-Oriented Programming: Unlearning Objects, MEAP Version 2